Skip to content

RUST-139 SubmitReview: Use Vault token#230

Merged
sebastien-marichal merged 1 commit into
masterfrom
Pavel/SubmitReviewToken
Apr 28, 2026
Merged

RUST-139 SubmitReview: Use Vault token#230
sebastien-marichal merged 1 commit into
masterfrom
Pavel/SubmitReviewToken

Conversation

@pavel-mikula-sonarsource

Copy link
Copy Markdown
Contributor

With the latest automation changes, we need the Vault-based token now. It's the same token as the one in RequestReview.yml file. Please take care of merging this, I have 200+ repos to update.

@pavel-mikula-sonarsource pavel-mikula-sonarsource requested a review from a team as a code owner April 28, 2026 09:28
@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot changed the title SubmitReview: Use Vault token RUST-139 SubmitReview: Use Vault token Apr 28, 2026
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

RUST-139

@sonar-review-alpha

sonar-review-alpha Bot commented Apr 28, 2026

Copy link
Copy Markdown

Summary

This PR migrates the SubmitReview workflow to retrieve the GitHub token from Vault instead of relying on a repository secret. A new secret fetch step retrieves GITHUB_TOKEN from Vault's development environment, and the SubmitReview action now uses this Vault-sourced token. The pull-requests: read permission is removed as it's no longer required.

This brings SubmitReview.yml in line with the RequestReview.yml pattern and is part of standardizing token management across 200+ repositories.

What reviewers should know

Key changes:

  • The secrets step now retrieves GITHUB_TOKEN from Vault alongside JIRA_USER and JIRA_TOKEN
  • The github-token input switched from secrets.GITHUB_TOKEN (repo secret) to the Vault output
  • pull-requests: read permission removed — verify this is safe given the new token source

For reviewers:
Start by confirming the Vault path (development/github/token/{REPO_OWNER_NAME_DASH}-jira) exists and is configured correctly. The token itself should be the same; only the retrieval method changed. Check that the fromJSON() parsing matches the vault-action-wrapper output format.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

@sonar-review-alpha sonar-review-alpha Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM! ✅

This PR correctly aligns SubmitReview.yml with the already-updated RequestReview.yml. The Vault path, fromJSON expression syntax, token field name, and permissions block are now identical between the two files. {REPO_OWNER_NAME_DASH} is a Vault-native template variable resolved at runtime by vault-action-wrapper — not an unsubstituted placeholder. Removing pull-requests: read is correct; RequestReview.yml never needed it either, as the Vault-issued token carries its own GitHub App permissions.

🗣️ Give feedback

@sebastien-marichal sebastien-marichal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@sebastien-marichal sebastien-marichal enabled auto-merge (squash) April 28, 2026 09:34
@sonarqube-next

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed for 'sonar-rust'

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
0 Dependency risks
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube

@sebastien-marichal sebastien-marichal merged commit 187ff43 into master Apr 28, 2026
15 checks passed
@sebastien-marichal sebastien-marichal deleted the Pavel/SubmitReviewToken branch April 28, 2026 09:42
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