chore: pinear SonarSource/sonarqube-scan-action a SHA#49
Merged
Conversation
Cambia el ref de @v6 (tag flotante) al commit SHA fd88b7d (v6.0.0) para cerrar el Security Hotspot de SonarCloud (regla githubactions:S7637). Riesgo cubierto: si SonarSource pierde control del repo de la action y un atacante reescribe la tag v6, nuestro CI ejecutaria codigo arbitrario. Con SHA pineado el ref es inmutable. Trade-off: hay que renovar a mano cuando salga una version nueva. Las actions de actions/* se dejan en @v4 porque Sonar no las flagea (son first-party de GitHub) y pinear a SHA hace el workflow ilegible.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Resumen
Cierra el Security Hotspot que SonarCloud abrió en
maintras el merge de #45 — reglagithubactions:S7637(Use full commit SHA hash for this dependency).Cambio:
SonarSource/sonarqube-scan-action@v6→@fd88b7d...(SHA del tagv6.0.0).Por qué
Una tag de GitHub (
v6,v6.0) es mutable: si SonarSource pierde control del repo, un atacante puede reescribir la tag para que apunte a un commit con un script malicioso, y el siguiente run de nuestro CI ejecutaría ese código con acceso aSONAR_TOKENyGITHUB_TOKEN. Pinear a SHA elimina ese vector.Por qué solo esta action
Sonar no flagea
actions/checkout,actions/setup-node, etc. — son first-party de GitHub y la regla las exime. Pinear las deactions/*a SHA también es buena práctica pero hace el workflow ilegible y requiere Renovate/Dependabot para no quedarse sin actualizaciones de seguridad. Si en algún momento se quiere ese nivel de paranoia se hace en otro PR + bot de actualización.Mantenimiento
Cuando salga una nueva versión de la action: comprobar https://github.com/SonarSource/sonarqube-scan-action/releases, copiar el SHA del nuevo tag y actualizar el comentario
# v6.x.y. Esto está documentado in-line en el workflow.Test plan