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
12 changes: 2 additions & 10 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# someone with write access reviews the latest commit on demand. A `skip-review` label skips the automatic reviews.
#
# pull_request_target and issue_comment both run this file from the default branch, so a pull request can't change its
# own review. Its code is checked out only to be read: nothing from it is built, run or installed.
# own review. The engine fetches its code only to read it: nothing from it is built, run or installed.
#
# This file is yours: template updates show their changes to it and leave your copy alone, so a pin you bumped isn't
# moved back. The action is pinned to an exact release tag, never a branch or a floating major: it receives the
Expand Down Expand Up @@ -55,16 +55,8 @@
path: base
persist-credentials: false

- name: Check out the pull request's head to read
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || format('refs/pull/{0}/head', github.event.issue.number) }}
path: pr
fetch-depth: 0
persist-credentials: false

- name: Review
uses: NCodeGroup/code-review@v0.2.1
uses: NCodeGroup/code-review@v0.3.0

Check notice on line 59 in .github/workflows/code-review.yml

View check run for this annotation

NCode Review / Code review

F1 Nit: Should the secret-bearing action be pinned to a commit SHA rather than to tag v0.3.0?

`NCodeGroup/code-review@v0.3.0` receives `NCODE_REVIEW_APP_PRIVATE_KEY` and `AWS_BEARER_TOKEN_BEDROCK`, but it is pinned by tag. The header comment says this is deliberate and relies on code-review's tag ruleset, which forbids moving or deleting tags. Consequence: That protection depends on another repository's settings. If the ruleset is loosened or the org is compromised, the tag could be pointed at different code, and that code would run with the org's secrets. A SHA pin doesn't depend on that ruleset. Fix: Is relying on the tag ruleset intended? If not, pin to the full commit SHA with a `# v0.3.0` comment. Dependabot still opens bumps for SHA pins.
Comment thread
polewskm marked this conversation as resolved.
Resolved
with:
app-private-key: ${{ secrets.NCODE_REVIEW_APP_PRIVATE_KEY }}
bedrock-api-key: ${{ secrets.AWS_BEARER_TOKEN_BEDROCK }}
Loading