Code Review

Simple notes on code review

Dependency Confusion

We can use confused to scan package requirement file

git clone https://github.com/visma-prodsec/confused 
cd confused
go get 
go build
  • Usage

confused -l pip requirements.txt
confused -l npm package.json # default
confused -l composer composer.json
confused -l mvn pom.xml
confused -l rubygems Gemfile.lock

Hijacking Dependencies

Python-pip

Nodejs-npm

  • TODO

Static Application Security Analysis (SAST)

Here are a set of tools I usually use when I conduct a source code review:

  • Semgrep: It has a good set of rules for pointing out weak code practices.

  • Snyk: Snyk is good (Available Vscode extension)

  • Trivy: Built mainly for container security, it's suitable for dependency vulnerability scanning. (Available Vscode extension)

Secrets Scanning

I personally prefer gitleaks for scanning a git repo, Because it points out informative information beside the secret.

For scanning container images for secrets and vulnerabilities, i would use trivy.

Other than that trufflehog is good.

Last updated