-
Notifications
You must be signed in to change notification settings - Fork 0
chore(BytePort): workflow hardening -- ubuntu-24.04, SHA pins #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c86afcf
157e66c
79f662d
3cb3f42
d15cac1
e2edf8e
770ea7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,13 +11,15 @@ on: | |
| - main | ||
| pull_request: | ||
|
|
||
|
|
||
| permissions: | ||
| contents: read | ||
| actions: read | ||
|
|
||
| jobs: | ||
| vet: | ||
| name: Go Vet | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Vet job still uses
|
||
| permissions: | ||
| contents: read | ||
| strategy: | ||
|
|
@@ -28,9 +30,9 @@ jobs: | |
| - backend/nvms | ||
| steps: | ||
| - name: Checkout the code | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c | ||
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | ||
| with: | ||
| go-version-file: ${{ matrix.module }}/go.mod | ||
| cache-dependency-path: ${{ matrix.module }}/go.sum | ||
|
|
@@ -40,7 +42,8 @@ jobs: | |
|
|
||
| build: | ||
| name: Go Build | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 30 | ||
| permissions: | ||
| contents: read | ||
| strategy: | ||
|
|
@@ -51,9 +54,9 @@ jobs: | |
| - backend/nvms | ||
| steps: | ||
| - name: Checkout the code | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c | ||
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | ||
| with: | ||
| go-version-file: ${{ matrix.module }}/go.mod | ||
| cache-dependency-path: ${{ matrix.module }}/go.sum | ||
|
|
@@ -63,15 +66,16 @@ jobs: | |
|
|
||
| fmt: | ||
| name: Go Fmt (advisory) | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| continue-on-error: true | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout the code | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c | ||
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | ||
| with: | ||
| go-version: 'stable' | ||
| - name: Check formatting | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,8 +7,12 @@ on: | |
| types: [opened, reopened, synchronize] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| actions: read | ||
|
Comment on lines
+10
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Architect Review — CRITICAL The Release Drafter workflow now sets the GITHUB_TOKEN to read-only ( Suggestion: Grant the Fix in Cursor | Fix in VSCode Claude (Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is an **Architect / Logical Review** comment left during a code review. These reviews are first-class, important findings — not optional suggestions. Do NOT dismiss this as a 'big architectural change' just because the title says architect review; most of these can be resolved with a small, localized fix once the intent is understood.
**Path:** .github/workflows/release-drafter.yml
**Line:** 10:12
**Comment:**
*CRITICAL: The Release Drafter workflow now sets the GITHUB_TOKEN to read-only (`permissions: contents: read, actions: read`) and does not override this at the job level, so the `release-drafter` step cannot create or update release drafts as intended.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
If a suggested approach is provided above, use it as the authoritative instruction. If no explicit code suggestion is given, you MUST still draft and apply your own minimal, localized fix — do not punt back with 'no suggestion provided, review manually'. Keep the change as small as possible: add a guard clause, gate on a loading state, reorder an await, wrap in a conditional, etc. Do not refactor surrounding code or expand scope beyond the finding.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fixThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Release drafter permissions block breaks draft creationHigh Severity The newly added top-level Reviewed by Cursor Bugbot for commit 770ea7b. Configure here. |
||
| jobs: | ||
| update_release_draft: | ||
| timeout-minutes: 15 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Release drafter still uses
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: release-drafter/release-drafter@6a93d829887aa2e0748befe2e808c66c0ec6e4c7 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| [workspace] | ||
| resolver = "2" | ||
| resolver = "3" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cargo resolver changed from "2" to "3" unexpectedlyMedium Severity The workspace Reviewed by Cursor Bugbot for commit 770ea7b. Configure here. |
||
| members = [ | ||
| "frontend/web/src-tauri", | ||
| ] | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cargo audit missing
checks: writepermission breaks annotationsHigh Severity
The newly added top-level
permissionsblock grants onlycontents: readandactions: read, but therustsec/audit-checkaction requireschecks: writeto post check-run results and annotations via the GitHub API. Previously, no explicitpermissionsblock existed, so the default token permissions (which includechecks: write) applied. Now the action will fail with a "Resource not accessible by integration" error when it tries to create the check run.Reviewed by Cursor Bugbot for commit 770ea7b. Configure here.