Skip to content
Closed
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
17 changes: 17 additions & 0 deletions .github/workflows/superagent-pr-scan-dedup-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Superagent PR scan dedup test

on:
pull_request:
branches: [main, develop]

permissions: write-all
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Workflow grants write-all permissions without least-privilege restriction

Workflow uses overly broad write-all permissions.

Use least-privilege permissions instead of write-all.

AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.

<file name=".github/workflows/superagent-pr-scan-dedup-test.yml">
<violation number="1" location=".github/workflows/superagent-pr-scan-dedup-test.yml:7">
<priority>P2</priority>
<title>Workflow grants write-all permissions without least-privilege restriction</title>
<evidence>permissions: write-all</evidence>
<recommendation>Replace permissions: write-all with a minimal permissions block (e.g., permissions: {} at the workflow level and grant only required permissions per job) to reduce blast radius if the workflow is later extended with secrets or write operations.</recommendation>
</violation>
</file>


jobs:
dedup-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: GitHub Action pinned to mutable version tag instead of immutable commit SHA

Action uses mutable version tag instead of commit SHA.

Pin to a full commit SHA with a version comment.

AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.

<file name=".github/workflows/superagent-pr-scan-dedup-test.yml">
<violation number="1" location=".github/workflows/superagent-pr-scan-dedup-test.yml:13">
<priority>P2</priority>
<title>GitHub Action pinned to mutable version tag instead of immutable commit SHA</title>
<evidence>uses: actions/checkout@v4</evidence>
<recommendation>Pin the action to a full 40-character commit SHA of the intended release and append a version comment, e.g., uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1.</recommendation>
</violation>
</file>


- name: Echo PR metadata
if: github.event_name == 'pull_request'
run: echo "PR title is ${{ github.event.pull_request.title }}"
Loading