Skip to content

Commit 5b5574b

Browse files
Initial commit
0 parents  commit 5b5574b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+6893
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"onCreateCommand": "sudo apt-get update && sudo apt-get -y install libldap2-dev libsasl2-dev && pip3 install pyOpenSSL && pip3 install -r requirements.txt",
3+
"customizations": {
4+
"vscode": {
5+
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "ms-vscode.cpptools-extension-pack", "redhat.vscode-yaml", "golang.go"]
6+
}
7+
},
8+
"postCreateCommand": "npm install --prefix Season-2/Level-3/ Season-2/Level-3/ && npm install --global mocha"
9+
}

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"

.github/workflows/codeql-analysis.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "CodeQL Analysis"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
analyze:
11+
name: Analyze
12+
runs-on: ubuntu-latest
13+
permissions:
14+
actions: read
15+
contents: read
16+
security-events: write
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
language: ['python', 'go', 'javascript']
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Initialize CodeQL
28+
uses: github/codeql-action/init@v3
29+
with:
30+
languages: ${{ matrix.language }}
31+
32+
- name: Autobuild
33+
uses: github/codeql-action/autobuild@v3
34+
35+
- name: Perform CodeQL Analysis
36+
uses: github/codeql-action/analyze@v3

.github/workflows/jarvis-code.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# //////////////////////////////////////////////////////////////////////////////////////////////////
2+
# /// ///
3+
# /// 1. Review the code in this file. Can you spot the bug? ///
4+
# /// 2. Fix the bug and push your solution so that GitHub Actions can run ///
5+
# /// 3. You successfully completed this level when .github/workflows/jarvis-hack.yml pass 🟢 ///
6+
# /// 4. If you get stuck, read the hint in hint-1.txt and try again ///
7+
# /// 5. If you need more guidance, read the hint in hint-2.txt and try again ///
8+
# /// 6. Compare your solution with solution.yml. Remember, there are several possible solutions ///
9+
# /// ///
10+
# //////////////////////////////////////////////////////////////////////////////////////////////////
11+
12+
name: CODE - Jarvis Gone Wrong
13+
14+
on:
15+
push:
16+
paths:
17+
- ".github/workflows/jarvis-code.yml"
18+
19+
jobs:
20+
jarvis:
21+
if: ${{ !github.event.repository.is_template }}
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
steps:
26+
- name: Check out code
27+
uses: actions/checkout@v4
28+
- name: Check GitHub Status
29+
# Source of GitHub Action in line 30:
30+
# https://github.com/dduzgun-security/secure-code-game-action
31+
uses: dduzgun-security/secure-code-game-action@1c9ed9f1e57d7b8c4e9bfa8013fd54e322214eb4 # v2.0
32+
with:
33+
who-to-greet: "Jarvis, obviously ..."
34+
get-token: "token-4db56ee8-dbec-46f3-96f5-32247695ab9b"

.github/workflows/jarvis-hack.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file is expected to fail ❌ upon push until you fix the bug
2+
# You successfully completed this level when this file pass 🟢 upon push
3+
name: HACK - Jarvis Gone Wrong
4+
5+
on:
6+
push:
7+
paths:
8+
- ".github/workflows/jarvis-code.yml"
9+
10+
jobs:
11+
jarvis:
12+
if: ${{ !github.event.repository.is_template }}
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
steps:
17+
- name: Check out code
18+
uses: actions/checkout@v4
19+
20+
- name: Check for insecure actions
21+
run: |
22+
if grep -q "uses: dduzgun-security/secure-code-game-action@" $GITHUB_WORKSPACE/.github/workflows/jarvis-code.yml; then
23+
echo "Insecure action detected. Please remove it from your workflow."
24+
exit 1
25+
fi

0 commit comments

Comments
 (0)