Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
runs:
using: composite
steps:
- name: Setup Node
uses: actions/setup-node@v6
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version-file: .nvmrc
cache: 'yarn'
cache-dependency-path: yarn.lock
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies

Check failure

Code scanning / CodeQL

Untrusted Checkout TOCTOU Critical

Insufficient protection against execution of untrusted code on a privileged workflow (
issue_comment
).
shell: bash
run: yarn install --frozen-lockfile

- name: Print Environment Info

Check failure

Code scanning / CodeQL

Untrusted Checkout TOCTOU Critical

Insufficient protection against execution of untrusted code on a privileged workflow (
issue_comment
).
shell: bash
run: yarn nx report

Check failure

Code scanning / CodeQL

Untrusted Checkout TOCTOU Critical

Insufficient protection against execution of untrusted code on a privileged workflow (
issue_comment
).
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ on:
- main
pull_request:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
persist-credentials: false
- uses: ./.github/actions/setup-node
- run: yarn run build
11 changes: 9 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ name: Commitlint

on: [pull_request]

permissions:
contents: read

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-node
- run: echo "${{ github.event.pull_request.title }}" | yarn commitlint --verbose
- env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: printf '%s\n' "$PR_TITLE" | yarn commitlint --verbose
5 changes: 3 additions & 2 deletions .github/workflows/deploy-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ jobs:
if: ${{ github.repository_owner == 'koobiq' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
Comment thread
coderabbitai[bot] marked this conversation as resolved.
persist-credentials: false
- uses: ./.github/actions/setup-node
- run: yarn run build
- uses: FirebaseExtended/action-hosting-deploy@v0.11.0
- uses: FirebaseExtended/action-hosting-deploy@500ac625ca2dd40cbd15f7659af953801858032a # v0.11.0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KOOBIQ }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository && contains(fromJSON('["OWNER", "MEMBER", "CONTRIBUTOR"]'), github.event.pull_request.author_association) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-node
# Run dev mode build to generate the `e2eRoute`
# @see dev/ag-grid-angular/src/main.ts
- run: yarn run build --configuration=development
- uses: FirebaseExtended/action-hosting-deploy@v0.11.0
- uses: FirebaseExtended/action-hosting-deploy@500ac625ca2dd40cbd15f7659af953801858032a # v0.11.0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KOOBIQ }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/e2e-approve-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
runs-on: ubuntu-24.04-arm
timeout-minutes: 10
steps:
- uses: xt0rted/pull-request-comment-branch@v3
- uses: xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v3.0.0
id: comment-branch
- uses: thollander/actions-comment-pull-request@v3
- uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
with:
message: 🔄 [Updating](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) snapshots.
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
ref: ${{ steps.comment-branch.outputs.head_sha }}
- run: npm run e2e:docker:update-snapshots
Comment on lines +27 to 30
Comment on lines +27 to 30

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow files =="
for f in .github/workflows/e2e-approve-snapshots.yml .github/workflows/commitlint.yml .github/workflows/e2e.yml; do
  if [ -f "$f" ]; then
    echo "--- $f $(wc -l < "$f") lines ---"
    cat -n "$f"
  else
    echo "MISSING $f"
  fi
done

echo
echo "== references to checkout and commit auto action =="
rg -n "actions/checkout|GITHUB_TOKEN|token:|auto-|persist-credentials|permissions:" .github/workflows -S || true

echo
echo "== package/scripts relevant =="
if [ -f package.json ]; then
  node -e "const p=require('./package.json'); console.log(JSON.stringify({scripts:p.scripts}, null, 2));"
fi

Repository: koobiq/data-grid

Length of output: 10354


🌐 Web query:

actions/checkout v7 persist-credentials default true local git configuration GITHUB_TOKEN

💡 Result:

In actions/checkout v7, the persist-credentials input defaults to true [1]. When set to true, the action configures the authentication token (or SSH key) in the local git configuration, enabling your workflow scripts to run authenticated git commands like git push or git fetch [2][3][4]. Key details regarding this behavior include: Storage location: As of v6 and maintained in v7, the action persists these credentials to a separate file (typically under $RUNNER_TEMP) rather than directly within the.git/config file, which improves credential security by preventing potential leaks through artifacts or other accidental exposures [5][6][7]. Cleanup: The action automatically removes these persisted credentials during the post-job cleanup phase [2][4]. Security: While the default remains true, setting persist-credentials to false is the recommended way to opt out if your workflow does not require authenticated git operations [2][3]. Even when set to true, the credentials are scoped to the checkout step and its subsequent environment, and they are cleared after the job completes [2][4]. If you are using GITHUB_TOKEN, this token is automatically used for authentication by default when persist-credentials is true, unless you provide a different token via the token input [4][8].

Citations:


Disable persisted checkout credentials before running PR-controlled code.

actions/checkout defaults to persisting the workflow token, and these workflows then run that code with the current git credentials in the runner environment.

  • Set persist-credentials: false on .github/workflows/e2e-approve-snapshots.yml:27, .github/workflows/commitlint.yml:12, and .github/workflows/e2e.yml:18.
  • In e2e-approve-snapshots.yml, pass token: ${{ secrets.GITHUB_TOKEN }} only to stefanzweifel/git-auto-commit-action, if it requires it for the commit.
🧰 Tools
🪛 zizmor (1.29.0)

[warning] 27-29: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

📍 Affects 3 files
  • .github/workflows/e2e-approve-snapshots.yml#L27-L30 (this comment)
  • .github/workflows/commitlint.yml#L12-L12
  • .github/workflows/e2e.yml#L18-L18
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/e2e-approve-snapshots.yml around lines 27 - 30, Set
persist-credentials to false for the actions/checkout steps in
.github/workflows/e2e-approve-snapshots.yml:27-30,
.github/workflows/commitlint.yml:12, and .github/workflows/e2e.yml:18. In the
e2e-approve-snapshots workflow, provide secrets.GITHUB_TOKEN only to
stefanzweifel/git-auto-commit-action if required for committing snapshot
updates.

Sources: Linters/SAST tools, Pipeline failures

- uses: stefanzweifel/git-auto-commit-action@v7
- uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0
Comment on lines 30 to +31
id: commit-and-push
with:
commit_message: 'test: updated e2e snapshots'
Expand All @@ -37,11 +37,11 @@
if: ${{ steps.commit-and-push.outputs.changes_detected == 'true' }}
with:
message: ✅ Snapshots [updated](https://github.com/${{ github.repository }}/pull/${{ github.event.issue.number }}/commits/${{ steps.commit-and-push.outputs.commit_hash }})!
- uses: thollander/actions-comment-pull-request@v3
- uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
if: ${{ steps.commit-and-push.outputs.changes_detected != 'true' }}
with:
message: ⚠️ No snapshots changes detected.
- uses: thollander/actions-comment-pull-request@v3
- uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
if: ${{ failure() }}
with:
message: 🚨 Failed to [update](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) snapshots.
8 changes: 5 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ jobs:
runs-on: ubuntu-24.04-arm
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- id: run-e2e-tests
run: npm run e2e:docker
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ always() }}
id: upload-report
with:
name: playwright-report
path: playwright-report/
retention-days: 5
- uses: thollander/actions-comment-pull-request@v3
- uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
if: ${{ failure() && steps.run-e2e-tests.outcome == 'failure' }}
with:
message: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ on:
- main
pull_request:

permissions:
contents: read

jobs:
linters:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-node
- run: |
yarn run prettier
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pr-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
types:
- opened

permissions: {}

jobs:
notify:
runs-on: ubuntu-latest
Expand All @@ -18,7 +20,7 @@ jobs:
steps:
- name: Notification to main channel
if: ${{ github.actor != 'dependabot[bot]' }}
uses: mattermost/action-mattermost-notify@v2.1.0
uses: mattermost/action-mattermost-notify@ae31bb6f9e26a54336e79696f108a2c91cf55b4e # v2.1.0
env:
NODE_TLS_REJECT_UNAUTHORIZED: '0'
with:
Expand All @@ -28,7 +30,7 @@ jobs:
TEXT: ${{ env.TEXT }}

- name: Notification to dev channel
uses: mattermost/action-mattermost-notify@v2.1.0
uses: mattermost/action-mattermost-notify@ae31bb6f9e26a54336e79696f108a2c91cf55b4e # v2.1.0
env:
NODE_TLS_REJECT_UNAUTHORIZED: '0'
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ jobs:
if: ${{ github.repository_owner == 'koobiq' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: ./.github/actions/setup-node
- run: yarn nx release publish --registry=https://registry.npmjs.org/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- uses: mattermost/action-mattermost-notify@v2.1.0
- uses: mattermost/action-mattermost-notify@ae31bb6f9e26a54336e79696f108a2c91cf55b4e # v2.1.0
env:
NODE_TLS_REJECT_UNAUTHORIZED: '0'
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/redeploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/redeploy-preview') && contains(fromJSON('["OWNER", "MEMBER"]'), github.event.comment.author_association) }}
runs-on: ubuntu-latest
steps:
- uses: xt0rted/pull-request-comment-branch@v3
- uses: xt0rted/pull-request-comment-branch@e8b8daa837e8ea7331c0003c9c316a64c6d8b0b1 # v3.0.0
id: comment-branch
- uses: thollander/actions-comment-pull-request@v3
- uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
with:
message: 🔄 [Redeploying](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) documentation preview.
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
ref: ${{ steps.comment-branch.outputs.head_sha }}
persist-credentials: false
- uses: ./.github/actions/setup-node
# Run dev mode build to generate the `e2eRoute`
# @see dev/ag-grid-angular/src/main.ts
- run: yarn run build --configuration=development

Check failure

Code scanning / CodeQL

Untrusted Checkout TOCTOU Critical

Insufficient protection against execution of untrusted code on a privileged workflow (
issue_comment
).
- uses: FirebaseExtended/action-hosting-deploy@v0.11.0
- uses: FirebaseExtended/action-hosting-deploy@500ac625ca2dd40cbd15f7659af953801858032a # v0.11.0
Comment on lines 34 to +35
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_KOOBIQ }}'
expires: 3d
channelId: data-grid-pr-${{ github.event.issue.number }}
target: next
- uses: thollander/actions-comment-pull-request@v3
- uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
if: ${{ failure() }}
with:
message: 🚨 Failed to [redeploy](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) documentation preview.
7 changes: 6 additions & 1 deletion .github/workflows/units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ on:
- main
pull_request:

permissions:
contents: read

jobs:
units:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-node
- run: yarn run unit