Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/vulnerability-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ permissions:
contents: read
packages: read
security-events: read
vulnerability-alerts: read

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Repository files matching actionlint/workflows:"
git ls-files | rg '(^|/)(actionlint|.*lint.*|workflow|yml|yaml)$' || true

echo
echo "Target workflow:"
if [ -f .github/workflows/vulnerability-triage.yml ]; then
  nl -ba .github/workflows/vulnerability-triage.yml | sed -n '1,80p'
else
  echo "missing .github/workflows/vulnerability-triage.yml"
fi

echo
echo "Search for actionlint usage/config/versions:"
rg -n "actionlint|rhysd|security-audit|vulnerability-alerts" -S .github . 2>/dev/null || true

echo
echo "Version/actionlint command hints in workflow YAMLs:"
python3 - <<'PY'
import pathlib, re, subprocess
for p in subprocess.check_output(['git','ls-files','.github/workflows'], text=True).splitlines():
    text = pathlib.Path(p).read_text(errors='replace')
    if 'actionlint' in text or 'security-audit' in text or 'vulnerability-alerts' in text:
        print(f"\n--- {p} ---")
        lines=text.splitlines()
        for i,l in enumerate(lines,1):
            if any(k in l for k in ['actionlint','security-audit','vulnerability-alerts']):
                lo=max(1,i-3); hi=min(len(lines),i+5)
                print(f"@@ {lo}-{hi}")
                for n in range(lo,hi+1):
                    print(f"{n:4}: {lines[n-1]}")
PY

Repository: sourcebot-dev/sourcebot-helm-chart

Length of output: 313


🏁 Script executed:

#!/bin/bash
set -euo pipefail

if ! command -v actionlint >/dev/null 2>&1; then
  echo "actionlint is not available in this environment"
  exit 0
fi

actionlint --version 2>/dev/null || true

tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

printf '%s\n' 'name: test
on: push
jobs:
  a:
    runs-on: ubuntu-latest
    permissions:
      security-events: write
      vulnerability-alerts: read
    steps:
      - run: true
' > "$tmp/test.yml"

echo "actionlint permissions check for vulnerability-alerts/read:"
actionlint "$tmp/test.yml" 2>&1 || true

echo
echo "actionlint permissions check for unknown permission:"
printf '%s\n' 'name: test
on: push
jobs:
  a:
    runs-on: ubuntu-latest
    permissions:
      security-events: write
      foo-bar: read
    steps:
      - run: true
' > "$tmp/test2.yml"
actionlint "$tmp/test2.yml" 2>&1 || true

echo
echo "Relevant actionlint source references if available in Go module cache:"
mod="$(go env GOPATH 2>/dev/null)/pkg/mod"
[ -n "$mod" ] && rg -n "vulnerability-alerts|security-audit|permissions" "$mod" 2>/dev/null | head -80 || true

Repository: sourcebot-dev/sourcebot-helm-chart

Length of output: 1289


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "Fetching available actionlint GitHub tags/releases"
python3 - <<'PY'
import urllib.request
try:
    with urllib.request.urlopen("https://api.github.com/repos/rhysd/actionlint/tags", timeout=20) as r:
        tags=[t["name"] for t in r.read().decode().splitlines()[:0]]
        for line in r.readline():
            print(line)
except Exception as e:
    print(type(e).__name__, e)
PY

Repository: sourcebot-dev/sourcebot-helm-chart

Length of output: 366


Update actionlint before merging.

vulnerability-alerts: read is a supported GitHub Actions permission, but actionlint 1.7.12 rejects it as an unknown permission scope. Upgrade actionlint to a version that includes this scope, or configure the linter to tolerate it.

🧰 Tools
🪛 actionlint (1.7.12)

[error] 12-12: unknown permission scope "vulnerability-alerts". all available permission scopes are "actions", "artifact-metadata", "attestations", "checks", "contents", "deployments", "discussions", "id-token", "issues", "models", "packages", "pages", "pull-requests", "repository-projects", "security-events", "statuses"

(permissions)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/vulnerability-triage.yml at line 12, Update the workflow
linting configuration used for vulnerability-triage.yml so actionlint recognizes
the vulnerability-alerts permission scope, preferably by upgrading actionlint
beyond 1.7.12; otherwise configure the linter to tolerate this supported scope.
Preserve vulnerability-alerts: read unchanged.

Source: Linters/SAST tools

id-token: write

jobs:
Expand Down
Loading