-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Actions] Unpinned actions in same organization or same enterprise incorrectly trigger actions/unpinned-tag #18316
Comments
As far as I know, CodeQL rules only look at the code - not the operating environment - so fixing this could be tricky. One idea I had is that the rule could be modified to only apply to actions in a 'public' repository. That way the rule would only need to look at public information on GitHub without any need to authenticate with an enterprise or organization. |
It looks like the query has a hardcoded set of "trusted organizations": codeql/actions/ql/src/Security/CWE-829/UnpinnedActionsTag.ql Lines 21 to 23 in c95f8d7
If you can figure out how to parametrize your own organization, you could copy that query, modify it to allow your org, exclude the original, and use your modified copy instead? |
That query can now be configured via a data extension. Here's the data extension YAML file we use to populate the default list. You can modify this to replace the built-in orgs with your own list of trusted orgs, put it in a model pack, and then configure that model pack to be used by all of the repos in your org. |
Here is a detailed walkthrough to implement the allow list:
|
Was able to deploy and everything worked great. Thanks! |
Description of the false positive
The CodeQL rule
actions/unpinned-tag
(Unpinned tag for a non-immutable Action in workflow) triggers for actions in the same organization or the same enterprise.The description for the rule states "Unpinned 3rd party Action", which in our case triggered for an action in the same organization. Actions within the same owner, org, or enterprise are not 3rd party actions or untrusted.
Code samples or links to source code
The issue can be reproduced by:
sample-actions
in the same org (or enterprise)sample-actions
repository and tag the commit as `v1.The text was updated successfully, but these errors were encountered: