Skip to content

Conversation

@dougwaldron
Copy link
Contributor

What does this PR do?

The "test-visibility-github-action" action uses the actions/cache action and pins it to the "v4" tag.

- name: Go cache
uses: actions/cache@v4

My PR updates this to pin "actions/cache" to a specific commit hash instead.

Motivation

Pinning an action to a tag instead of a commit is a bit more convenient because the tag can be moved by the action owner to the latest release. But for the same reason it's a bit less secure because the tag can also be moved to a compromised version by a malicious actor. Pinning to a specific commit ensures the chosen version can't be altered.

Furthermore, GitHub organizations have the option to enforce this as a mandatory policy. Since our org has that policy enabled, your action is blocked and we aren't able to use it.

Additional Notes

The "actions/cache" commit selected in this PR is the one currently tagged as "v4" and "v4.3.0".

For more background info:

The actions/cache commit selected is currently tagged as v4 and v4.3.0
@dougwaldron dougwaldron requested a review from a team as a code owner October 27, 2025 21:26
Copy link
Collaborator

@nikita-tkachenko-datadog nikita-tkachenko-datadog left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the contribution!

@nikita-tkachenko-datadog nikita-tkachenko-datadog merged commit f4b026b into DataDog:main Oct 28, 2025
2 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