Rules / GL093
GL093 interpreter runs a file disguised with a non-script extension
Severity: error
OWASP: CICD-SEC-4 – Poisoned Pipeline Execution
CWE: CWE-506 – Embedded Malicious Code
Risk
An interpreter (node, python, ruby, bun, deno, …) run on a file whose extension is a data, asset or document type — a font, image, PDF, log and so on — is almost never legitimate: those files are not code. The mismatch is the disguise. A reviewer skims past fa-brands-400.ttf as a font, but when a job runs node …/fa-brands-400.ttf, the "font" is obfuscated JavaScript that executes with the job's environment, tokens and runner access.
This is the shape of the PolinRider campaign, which hid obfuscated JavaScript inside files named like Font Awesome assets (fa-brands-400.ttf, .woff2, …) and ran them from a committed task. The same line fits a script: block directly.
Trigger example
build:
script:
- node assets/fa-brands-400.ttf
Flagged: an interpreter (node, nodejs, deno run, bun / bun run, python / python2 / python3, ruby, perl, php, Rscript, osascript, pwsh / powershell), optionally with a path and flags, whose file argument ends in a data/asset/document extension: .ttf .otf .woff .woff2 .eot .png .jpg .jpeg .gif .ico .bmp .svg .webp .pdf .csv .tsv .dat .bin .log .md .txt .lock.
What is not flagged
- A real script extension:
node dist/index.mjs,python main.py,ruby app.rb,deno run server.ts. - Inline code with no file:
node -e …,python -c …,python -m http.server, or a barenodeREPL. bunx/bun x pkg@latest— a registry package runner, covered by GL022.- A quoted mention that is not a command, e.g.
echo "node payload.ttf".
Safe alternative
build:
script:
- node scripts/build.js
Keep executable code in files with the interpreter's own script extension, and keep fonts, images and other assets as data the pipeline reads but never runs.
Notes
- Severity is
error. - Matched on the quote-masked line, so a mention inside a string is not read as a command.
- Script-line rule; assumes POSIX shell (see the README Shell assumptions note).
- Suppress per-file with
.glsec-ignoreor inline# glsec:ignore GL093.
References
- GL011: download-and-execute pattern in script
- GL083: reverse shell, backdoor or credential exfiltration in script
Documentation for glsec 1.29.0. Source of this page · Rule implementation