generated from skills/secure-code-game
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 899f71f
Showing
78 changed files
with
6,804 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.