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 f34bd91
Showing
79 changed files
with
6,786 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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
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@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
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,34 @@ | ||
# ////////////////////////////////////////////////////////////////////////////////////////////////// | ||
# /// /// | ||
# /// 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: | ||
if: ${{ !github.event.repository.is_template }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- 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@1c9ed9f1e57d7b8c4e9bfa8013fd54e322214eb4 # v2.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,25 @@ | ||
# 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: | ||
if: ${{ !github.event.repository.is_template }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- 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.