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
34 changes: 0 additions & 34 deletions .github/workflows/action_scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

- name: 'Initialize CodeQL'
if: "steps.check_files.outputs.workflow_files_found == 'true'"
uses: 'google/codeql-action/init@014f16e7ab1402f30e7c3329d33797e7948572db' # ratchet:google/codeql-action/init@v4

Check failure on line 59 in .github/workflows/action_scanning.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

impostor-commit

action_scanning.yml:59: commit with no history in referenced repository: uses a commit that doesn't belong to the specified org/repo
with:
languages: 'actions'
config: |
Expand All @@ -68,7 +68,7 @@
- name: 'Perform CodeQL Analysis'
if: "steps.check_files.outputs.workflow_files_found == 'true'"
id: 'codeql_analysis'
uses: 'google/codeql-action/analyze@014f16e7ab1402f30e7c3329d33797e7948572db' # ratchet:google/codeql-action/analyze@v4

Check failure on line 71 in .github/workflows/action_scanning.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

impostor-commit

action_scanning.yml:71: commit with no history in referenced repository: uses a commit that doesn't belong to the specified org/repo
with:
upload: 'never'

Expand All @@ -76,7 +76,7 @@
id: 'vuln_check'
if: "steps.check_files.outputs.workflow_files_found == 'true'"
run: |
SARIF_FILE="${{ steps.codeql_analysis.outputs.sarif-output }}/actions.sarif"

Check failure on line 79 in .github/workflows/action_scanning.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code
if [ ! -f "$SARIF_FILE" ]; then
echo "SARIF file not found at $SARIF_FILE"
exit 1
Expand All @@ -99,37 +99,3 @@
path: '${{ steps.codeql_analysis.outputs.sarif-output }}/actions.sarif'
retention-days: 1
overwrite: 'true'

- name: 'Explain Failures and Next Steps'
if: "failure() && steps.vuln_check.conclusion == 'failure'"
run: |
SARIF_FILE="${{ steps.codeql_analysis.outputs.sarif-output }}/actions.sarif"
{
echo "### Security Scan Results"
echo ""
echo "This is an automated scan to check for common classes of GitHub Actions security bugs."
echo "The checks are currently in **evaluate mode**. Merging is still possible with a failing test, but please ensure there are no real vulnerabilities."
echo "If you believe this is a false positive, please contact us (see below)."
echo ""
} >> "$GITHUB_STEP_SUMMARY"

if [ -f "$SARIF_FILE" ]; then
echo "#### Findings" >> "$GITHUB_STEP_SUMMARY"
jq -r '.runs[0].results[] | "- **" + .ruleId + "**: " + .message.text + " (" + .locations[0].physicalLocation.artifactLocation.uri + ":" + (.locations[0].physicalLocation.region.startLine | tostring) + ")"' "$SARIF_FILE" >> "$GITHUB_STEP_SUMMARY"
else
echo "SARIF file not found, cannot list specific failures." >> "$GITHUB_STEP_SUMMARY"
fi

{
echo ""
echo "#### Documentation"
echo "- [Untrusted Checkout (High)](https://codeql.github.com/codeql-query-help/actions/actions-untrusted-checkout-high/)"
echo "- [Artifact Poisoning (Critical)](https://codeql.github.com/codeql-query-help/actions/actions-artifact-poisoning-critical/)"
echo "- [Cache Poisoning (Poisonable Step)](https://codeql.github.com/codeql-query-help/actions/actions-cache-poisoning-poisonable-step/)"
echo "- [Envpath Injection (Critical)](https://codeql.github.com/codeql-query-help/actions/actions-envpath-injection-critical/)"
echo "- [Envvar Injection (Critical)](https://codeql.github.com/codeql-query-help/actions/actions-envvar-injection-critical/)"
echo ""
echo "#### Contact"
echo "- **External users**: opensource@google.com"
echo "- **Internal users**: go/github-requests (File a bug)"
} >> "$GITHUB_STEP_SUMMARY"
Loading