For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/cicd-github-obfuscation.md.
A documentation index is available at /llms.txt.
Obfuscated GitHub Actions usage (for example, weird uses: paths or needlessly complex/fenced expressions) makes workflows harder to audit and can hide malicious or unintended behavior.
For repository action references, the step uses property must not contain empty path components, . or ... It should be normalized to the concrete form owner/repo[/path]@ref so pattern-matching and provenance analysis work reliably.
For expressions anywhere routable text is allowed (such as step inputs/outputs and workflow fields), constant-reducible expressions should be replaced by their evaluated constant, and computed index expressions should be avoided. When replacing an entire fenced expression written ${{ ... }}, the fix must remove the fencing to preserve semantics. Fixes for reducible sub-expressions should target only the subfragment.
This rule flags step uses values with empty components or ./.., fenced expressions that can be constant-reduced, and computed index expressions. Automated fixes normalize uses paths and either replace full expressions with their evaluated value or rewrite only the reducible subexpression when possible.
# replace constant-fenced expression with its evaluated valueoutputs:iac/terraform/attribution.tfm--release_created:steps.release.outputs.iac/terraform/attribution.tfm--release_created
Compliant Code Examples
name:Valid Uses Pathson:pushjobs:test:runs-on:ubuntu-lateststeps:# Standard action reference- uses:actions/checkout@v4# With subpath- uses:github/codeql-action/init@v2# Local action (starts with ./)- uses:./path/to/action# Local action with subpath- uses:./.github/actions/custom-action# Docker action- uses:docker://alpine:3.18# Action with valid nested path- uses:aws-actions/configure-aws-credentials/subaction@v4# Action with commit SHA- uses:actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
name:Composite action with obfuscated usesdescription:Composite action that calls another action through an obfuscated pathruns:using:compositesteps:- name:Use obfuscated actionuses:actions/checkout/./@v4
1
2
rulesets:- CICD / GitHub # Rules to enforce / GitHub.
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.