github-actions-generator
Audited by Socket on Sep 15, 2026
6 alerts found:
Anomalyx3Securityx3The fragment is benign security documentation, not malware. It contains meaningful workflow security hazards in its illustrative examples, chiefly unsafe interpolation of attacker-controlled event data into shell scripts and privileged ChatOps/deployment workflows that may check out external PR code. These are configuration and injection risks requiring remediation when examples are used, but there is no evidence of malicious intent or supply-chain malware in the supplied text.
The fragment does not show intentional malware, but the security-scan workflow contains a serious supply-chain and CI security flaw. It checks out and runs npm ci on a pull request head SHA inside workflow_run with write-capable permissions, allowing attacker-controlled dependency or lifecycle scripts to execute with an elevated GitHub token. Use a trusted target-branch checkout for privileged workflows, or run untrusted PR analysis in a pull_request workflow with read-only permissions and isolate dependency installation. Reduce contents:write and other permissions to the minimum required, and verify artifact provenance before deployment.
The workflow is a legitimate ChatOps automation example but contains high-risk shell injection vulnerabilities because comment-derived job outputs are interpolated directly into shell scripts. More importantly, it executes pull-request-controlled npm code in a workflow with broad write permissions. It should use environment variables rather than expression interpolation, validate values after safely reading them, pin checkout to an immutable SHA, and run untrusted PR code with a read-only or isolated token and minimal permissions.
The workflow is a legitimate repository-dispatch automation example, but it has material injection risks. Direct payload interpolation into bash and github-script JavaScript can allow an authorized event sender to modify commands or execute API actions, particularly through incident message/service and deployment requestor values. Caller-controlled deployment refs also cause npm lifecycle/build code from that revision to run. No explicit malware, credential theft, suspicious network destination, persistence, or destructive behavior is shown. Inputs should be passed through environment variables, validated strictly, encoded with JSON-safe mechanisms, and permissions minimized.
The action is primarily a legitimate Node.js setup and caching utility with no direct evidence of malware. Its main security weakness is unsafe interpolation of user-controlled package-manager input into Bash before validation, which can permit command injection when the input is attacker-controlled. It also has a functional cache-design flaw because a cache hit skips installation while only package-manager caches are restored. Use environment variables for inputs, validate with fixed shell arguments, and do not treat a package-manager cache hit as proof that dependencies are installed.
The fragment is a benign but incomplete composite-action template, not evidence of malware. It contains a medium-severity command-injection risk if the input expressions are instantiated directly as shown, an output-injection risk when untrusted multiline values are written to GITHUB_OUTPUT, and a supply-chain risk if the setup-action placeholder is replaced with an untrusted or non-immutable reference. The unspecified main command and setup action require review in a completed implementation.