Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Maneppagolmanju authored Feb 16, 2024
0 parents commit 899f71f
Show file tree
Hide file tree
Showing 78 changed files with 6,804 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"onCreateCommand": "sudo apt-get update && sudo apt-get -y install libldap2-dev libsasl2-dev && pip3 install pyOpenSSL && pip3 install -r requirements.txt",
"customizations": {
"vscode": {
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "ms-vscode.cpptools-extension-pack", "redhat.vscode-yaml", "golang.go"]
}
},
"postCreateCommand": "npm install --prefix Season-2/Level-4/ Season-2/Level-4/ && npm install --global mocha"
}
36 changes: 36 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "CodeQL Analysis"

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['python', 'go', 'javascript']

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
33 changes: 33 additions & 0 deletions .github/workflows/jarvis-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# //////////////////////////////////////////////////////////////////////////////////////////////////
# /// ///
# /// 1. Review the code in this file. Can you spot the bug? ///
# /// 2. Fix the bug and push your solution so that GitHub Actions can run ///
# /// 3. You successfully completed this level when .github/workflows/jarvis-hack.yml pass 🟢 ///
# /// 4. If you get stuck, read the hint in hint-1.txt and try again ///
# /// 5. If you need more guidance, read the hint in hint-2.txt and try again ///
# /// 6. Compare your solution with solution.yml. Remember, there are several possible solutions ///
# /// ///
# //////////////////////////////////////////////////////////////////////////////////////////////////

name: CODE - Jarvis Gone Wrong

on:
push:
paths:
- ".github/workflows/jarvis-code.yml"

jobs:
jarvis:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Check GitHub Status
# Source of GitHub Action in line 30:
# https://github.com/dduzgun-security/secure-code-game-action
uses: dduzgun-security/secure-code-game-action@dc70b85ad674f6e93657401f3933622870372093 # v1.0
with:
who-to-greet: "Jarvis, obviously ..."
get-token: "token-4db56ee8-dbec-46f3-96f5-32247695ab9b"
24 changes: 24 additions & 0 deletions .github/workflows/jarvis-hack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is expected to fail ❌ upon push until you fix the bug
# You successfully completed this level when this file pass 🟢 upon push
name: HACK - Jarvis Gone Wrong

on:
push:
paths:
- ".github/workflows/jarvis-code.yml"

jobs:
jarvis:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Check for insecure actions
run: |
if grep -q "uses: dduzgun-security/secure-code-game-action@" $GITHUB_WORKSPACE/.github/workflows/jarvis-code.yml; then
echo "Insecure action detected. Please remove it from your workflow."
exit 1
fi
Loading

0 comments on commit 899f71f

Please sign in to comment.