Org-level Actions variables with visibility 'all' are exposed to every repository in the organization, including newly-created ones. Variables (unlike secrets) have their VALUES returned by the GitHub REST API, so leaking them through over-broad visibility may expose configuration data, hostnames, account IDs, or feature flags that adversaries can use during reconnaissance. Use 'selected' visibility to scope variables to only the repos that need them.
1. Go to Organization Settings -> Secrets and variables -> Actions -> Variables. 2. For each variable with visibility 'All repositories', change to 'Private repositories' or 'Selected repositories'.
{
"target": "GHActionsVariable",
"if": {
"allOf": [
{
"resource": "GHActionsVariable",
"property": "Visibility",
"operator": "notEquals",
"value": "all"
}
]
},
"then": {
"effect": "Audit"
}
}
Copyright © DevOps Shield. All Rights Reserved. Privacy Policy | Cookie Policy | Terms and Conditions | v1.0.2