Skip to content

JS-2482 Pin issue_comment vault-action-wrapper to 3.7.0 correctly - #7964

Merged
alex-meseldzija-sonarsource merged 1 commit into
masterfrom
alex/lmao
Sep 15, 2026
Merged

alex-meseldzija-sonarsource merged 1 commit into
masterfrom
alex/lmao

Conversation

@alex-meseldzija-sonarsource

Copy link
Copy Markdown
Contributor

Part of

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot changed the title Pin issue_comment vault-action-wrapper to 3.7.0 correctly JS-2482 Pin issue_comment vault-action-wrapper to 3.7.0 correctly Sep 15, 2026
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

JS-2482

@@ -24,7 +24,7 @@ jobs:
steps:
- name: Get cross-repo dispatch token from Vault

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: Sibling step in same job still on mutable @master ref

This PR fixes the ref in the secrets step (verified: SonarSource/vault-action-wrapper publishes unprefixed tags — refs/tags/3.7.0 exists, v3.7.0 does not, and v3 is a branch — so the previous @v3.7.0 could not resolve and the job failed at step 1). The pinning is incomplete for this workflow, though: the next step in the same job still uses SonarSource/core-languages-tooling-public/pvf-trigger@master, a mutable branch of another repo, and it receives the Vault DISPATCH_TOKEN (actions:write on SonarSource/peachee-js) via its dispatch-token input, which the composite action exports into a run: shell step. Any push to that branch changes what executes with that token in an issue_comment-triggered workflow, with no review on this side; pin it to a tag or full commit SHA like the vault step.

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Pins the vault-action-wrapper reference from the mutable @v3.7.0 tag to the correct @3.7.0 unprefixed tag. The sibling pvf-trigger step in the same job still references SonarSource/core-languages-tooling-public/pvf-trigger@master, a mutable branch that receives a privileged DISPATCH_TOKEN; consider pinning it to a specific tag or commit SHA for consistency and security.

💡 Security: Sibling step in same job still on mutable @master ref

📄 .github/workflows/pvf-comment.yml:25-39 🔗 pvf-trigger action.yml

This PR fixes the ref in the secrets step (verified: SonarSource/vault-action-wrapper publishes unprefixed tags — refs/tags/3.7.0 exists, v3.7.0 does not, and v3 is a branch — so the previous @v3.7.0 could not resolve and the job failed at step 1). The pinning is incomplete for this workflow, though: the next step in the same job still uses SonarSource/core-languages-tooling-public/pvf-trigger@master, a mutable branch of another repo, and it receives the Vault DISPATCH_TOKEN (actions:write on SonarSource/peachee-js) via its dispatch-token input, which the composite action exports into a run: shell step. Any push to that branch changes what executes with that token in an issue_comment-triggered workflow, with no review on this side; pin it to a tag or full commit SHA like the vault step.

🤖 Prompt for agents
Code Review: Pins the `vault-action-wrapper` reference from the mutable `@v3.7.0` tag to the correct `@3.7.0` unprefixed tag. The sibling `pvf-trigger` step in the same job still references `SonarSource/core-languages-tooling-public/pvf-trigger@master`, a mutable branch that receives a privileged `DISPATCH_TOKEN`; consider pinning it to a specific tag or commit SHA for consistency and security.

1. 💡 Security: Sibling step in same job still on mutable @master ref
   Files: .github/workflows/pvf-comment.yml:25-39

   This PR fixes the ref in the `secrets` step (verified: `SonarSource/vault-action-wrapper` publishes unprefixed tags — `refs/tags/3.7.0` exists, `v3.7.0` does not, and `v3` is a branch — so the previous `@v3.7.0` could not resolve and the job failed at step 1). The pinning is incomplete for this workflow, though: the next step in the same job still uses `SonarSource/core-languages-tooling-public/pvf-trigger@master`, a mutable branch of another repo, and it receives the Vault `DISPATCH_TOKEN` (actions:write on SonarSource/peachee-js) via its `dispatch-token` input, which the composite action exports into a `run:` shell step. Any push to that branch changes what executes with that token in an `issue_comment`-triggered workflow, with no review on this side; pin it to a tag or full commit SHA like the vault step.

Review coverage

Functional validation No results

Rules No rules evaluated

Auto-approval Not enabled · Set up

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@github-actions

Copy link
Copy Markdown
Contributor

Ruling Report

No changes to ruling expected issues in this PR

@sonarqube-next

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
0 Dependency risks
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@alex-meseldzija-sonarsource
alex-meseldzija-sonarsource merged commit 6cb647e into master Sep 15, 2026
45 checks passed
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