Skip to content

GHA-184 Add GitHub token for private rspec repository access#91

Merged
nils-werner-sonarsource merged 2 commits intomasterfrom
claude/task/9f2383a0
Feb 17, 2026
Merged

GHA-184 Add GitHub token for private rspec repository access#91
nils-werner-sonarsource merged 2 commits intomasterfrom
claude/task/9f2383a0

Conversation

@nils-werner-sonarsource
Copy link
Contributor

@nils-werner-sonarsource nils-werner-sonarsource commented Feb 13, 2026

This pull request enhances the update-rule-metadata GitHub Action by integrating support for securely retrieving and using a GitHub token from Vault for accessing a private rspec repository. It also adds automated tests to verify the correct configuration and usage of Vault secrets and environment variables. Documentation has been updated to reflect these new requirements and dependencies.

Vault Integration and Environment Variable Handling:

  • Added retrieval of the development/github/token/{REPO_OWNER_NAME_DASH}-rspec-read token from Vault in the update-rule-metadata/action.yml, mapping it to the GITHUB_TOKEN environment variable for use in the rule-api execution step. [1] [2]

Test with RPG: https://github.com/SonarSource/sonar-rpg/commit/941329c4daa4f966b3dc152857a5b9359c68b952
Proof-of-concept: https://github.com/SonarSource/sonar-rpg/actions/runs/22098525058

…etadata

The rspec repository is now private, requiring authentication. This adds
a GitHub token from vault and passes it as GITHUB_TOKEN env variable to
the rule-api execution step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title Add GitHub token for private rspec repository access GHA-184 Add GitHub token for private rspec repository access Feb 13, 2026
@hashicorp-vault-sonar-prod
Copy link

hashicorp-vault-sonar-prod bot commented Feb 13, 2026

GHA-184

…cess

The -its token does not have read access to SonarSource/rspec.
Use -rspec-read which matches the pattern used by sonar-rule-api's own CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

SonarQube reviewer guide

Review in SonarQube

Summary: Add vault secret retrieval and CI validation for GitHub token used to access private rspec repository.

Review Focus: Verify that the GitHub token vault configuration (new secret path development/github/token/{REPO_OWNER_NAME_DASH}-rspec-read) is correctly wired through the action. Pay special attention to the new vault-and-env-tests job to ensure the grep patterns accurately validate the action.yml structure, and confirm the token is properly passed to the rule-api execution step.

Start review at: update-rule-metadata/action.yml. This is the core configuration file where the vault secret is retrieved and passed to the rule-api execution. The correctness of the secret path and environment variable mapping is critical for the feature to work.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@nils-werner-sonarsource nils-werner-sonarsource merged commit 1cc00f1 into master Feb 17, 2026
9 checks passed
@nils-werner-sonarsource nils-werner-sonarsource deleted the claude/task/9f2383a0 branch February 17, 2026 15:40
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