Skip to content
lafkePublic

About

Intentionally vulnerable sample code that shows Lafke findings in GitHub Actions.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

Lafke demo

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.

What is in it

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.

How the findings show up

.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.

Run it locally

curl -fsSL https://lafke.sh/install | sh
lafke security .
lafke sast .       # source code, secrets and infrastructure only
lafke audit .      # dependencies only

About

Intentionally vulnerable sample code that shows Lafke findings in GitHub Actions.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages