Intentionally vulnerable sample code that shows what Lafke reports in GitHub Actions.
Warning: everything here is insecure on purpose. Do not deploy it, do not run it on a public network, and do not copy it into real projects. The credentials are fake.
| Path | Contains |
|---|---|
src/app.js |
Express handlers with SQL injection, command injection, path traversal, XSS, code injection, weak hashing, an open redirect and prototype pollution. |
src/app.py |
Flask handlers with SQL injection, command injection, insecure deserialization, unsafe YAML loading, weak hashing and a hardcoded secret. |
infra/main.tf |
Terraform with a public bucket, SSH and MySQL open to the internet, and a public, unencrypted database. |
package.json, package-lock.json |
Old express, lodash and minimist versions with known vulnerabilities. |
.github/workflows/lafke.yml runs the Lafke GitHub Action
with command: security, which combines dependency, source code, secret and infrastructure
checks. Open the latest run of the Lafke workflow to see:
- the report in the job summary,
- a comment with the same report on pull requests,
- the findings under Security > Code scanning, from the SARIF upload.
Lafke exits with 1 when it finds something, which is the expected result here, so the
workflow sets continue-on-error on that step and the job passes.
curl -fsSL https://lafke.sh/install | sh
lafke security .
lafke sast . # source code, secrets and infrastructure only
lafke audit . # dependencies only