Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jrs-devops authored Jun 17, 2024
0 parents commit 6e4cf4f
Show file tree
Hide file tree
Showing 79 changed files with 6,786 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"
}
6 changes: 6 additions & 0 deletions .github/dependabot.yml
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"
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@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
34 changes: 34 additions & 0 deletions .github/workflows/jarvis-code.yml
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"
25 changes: 25 additions & 0 deletions .github/workflows/jarvis-hack.yml
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
Loading

0 comments on commit 6e4cf4f

Please sign in to comment.