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
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,25 @@ jobs:

- name: Run tests
run: ./scripts/test

security:
timeout-minutes: 15
name: security
runs-on: ${{ github.repository == 'stainless-sdks/agentmail-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')

Comment on lines +118 to +123
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

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

P1: Missing permissions: security-events: write in the security job, which is required by github/codeql-action/upload-sarif to upload SARIF results. Without this permission, the step will fail on fork PRs where GITHUB_TOKEN defaults to read-only.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/ci.yml, line 118:

<comment>Missing `permissions: security-events: write` in the `security` job, which is required by `github/codeql-action/upload-sarif` to upload SARIF results. Without this permission, the step will fail on fork PRs where `GITHUB_TOKEN` defaults to read-only.</comment>

<file context>
@@ -114,3 +114,25 @@ jobs:
       - name: Run tests
         run: ./scripts/test
+
+  security:
+    timeout-minutes: 15
+    name: security
</file context>
Suggested change
security:
timeout-minutes: 15
name: security
runs-on: ${{ github.repository == 'stainless-sdks/agentmail-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
security:
timeout-minutes: 15
name: security
permissions:
security-events: write
runs-on: ${{ github.repository == 'stainless-sdks/agentmail-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
Fix with Cubic

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@7c7e9f9e64e329e6a8c92c7e2c26f1a78ad5f6ab # v0.29.0
with:
scan-type: 'fs'
scan-ref: '.'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy results to GitHub Security tab
uses: github/codeql-action/upload-sarif@49c3cd5deaee37c3cd3ddc0cac1d3ef12e6e13f1 # v4.0.4
with:
sarif_file: 'trivy-results.sarif'