Skip to content

Conversation

@matin-deriv
Copy link
Contributor

  • Claude code review
  • Claude.md file
  • Security NCLC Reviews

@vercel
Copy link

vercel bot commented Dec 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
deriv-api-docs Ready Ready Preview Dec 29, 2025 3:30am

@github-actions
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/checkout 4.*.* 🟢 6.5
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 56 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Code-Review🟢 10all changesets reviewed
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Packaging⚠️ -1packaging workflow not detected
Signed-Releases⚠️ -1no releases found
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Security-Policy🟢 9security policy file detected
Vulnerabilities🟢 91 existing vulnerabilities detected
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
SAST🟢 8SAST tool detected but not run on all commits
actions/anthropics/claude-code-security-review 68982a6bf10d545e94dd0390af08306d94ef684c UnknownUnknown
actions/slackapi/slack-github-action 6c661ce58804a1a20f6dc5fbee7f0381b469e001 🟢 6.3
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1024 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow⚠️ 0dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Token-Permissions🟢 8detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 8dependency not pinned by hash detected -- score normalized to 8
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
Vulnerabilities🟢 91 existing vulnerabilities detected
SAST🟢 10SAST tool is run on all commits

Scanned Manifest Files

.github/workflows/security-nclc-review.yml
package-lock.json


steps:
- name: Verify user
uses: 'deriv-com/shared-actions/.github/actions/verify_user_in_organization@v3'

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Claude Code Assistant' step
Uses Step
uses 'deriv-com/shared-actions/.github/actions/verify_user_in_organization' with ref 'v3', not a pinned commit hash
Comment on lines +35 to +44
- name: Checkout PR head
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 20
token: ${{ secrets.GITHUB_TOKEN }}

# Sanity check (helps diagnose if anything goes wrong)
- name: Verify git workspace

Check warning

Code scanning / CodeQL

Checkout of untrusted code in trusted context Medium

Potential unsafe checkout of untrusted pull request on privileged workflow.

Copilot Autofix

AI 3 days ago

In general, the fix is to avoid checking out and operating on the untrusted PR HEAD in a privileged context. For a review bot like this, the Claude action can work from the base repository combined with GitHub’s pull request metadata, without needing to execute code from the PR checkout. So the best fix is to stop checking out the PR head repository/ref, and instead either (a) check out the base repository on the merge commit / base ref, or (b) remove the checkout entirely if the Claude action does not require a local working tree.

The minimal change that preserves functionality while removing the unsafe pattern is:

  • Replace the “Checkout PR head” step with a standard checkout of the current repository using the default behavior of actions/checkout@v4. This gives the action read‑only access to the base repo as seen by the workflow, not to attacker‑controlled fork code.
  • Keep the rest of the workflow unchanged so that permissions, tokens, and the Claude action invocation continue to work as before.

Concretely, in .github/workflows/claude.yml, lines 35–41 (the Checkout PR head step) should be replaced by a safer checkout:

- name: Checkout repository
  uses: actions/checkout@v4
  with:
      fetch-depth: 20

No new imports or methods are needed; this is purely a workflow configuration change within that file.

Suggested changeset 1
.github/workflows/claude.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml
--- a/.github/workflows/claude.yml
+++ b/.github/workflows/claude.yml
@@ -31,14 +31,11 @@
                   username: ${{ github.event.pull_request.user.login }}
                   token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
 
-            # Ensure we have a real git repo at the PR HEAD (works for forks)
-            - name: Checkout PR head
+            # Checkout the repository in a safe context (do not use untrusted PR HEAD)
+            - name: Checkout repository
               uses: actions/checkout@v4
               with:
-                  repository: ${{ github.event.pull_request.head.repo.full_name }}
-                  ref: ${{ github.event.pull_request.head.ref }}
                   fetch-depth: 20
-                  token: ${{ secrets.GITHUB_TOKEN }}
 
             # Sanity check (helps diagnose if anything goes wrong)
             - name: Verify git workspace
EOF
@@ -31,14 +31,11 @@
username: ${{ github.event.pull_request.user.login }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

# Ensure we have a real git repo at the PR HEAD (works for forks)
- name: Checkout PR head
# Checkout the repository in a safe context (do not use untrusted PR HEAD)
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 20
token: ${{ secrets.GITHUB_TOKEN }}

# Sanity check (helps diagnose if anything goes wrong)
- name: Verify git workspace
Copilot is powered by AI and may make mistakes. Always verify output.
git log -1 --oneline

- name: Run Claude Code Action
uses: anthropics/claude-code-action@v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Claude Code Assistant' step
Uses Step
uses 'anthropics/claude-code-action' with ref 'v1', not a pinned commit hash
@matin-deriv matin-deriv deleted the matin/claude-files branch December 29, 2025 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants