Skip to content

Instantly share code, notes, and snippets.

@p-ja
Last active July 1, 2025 10:46
Show Gist options
  • Select an option

  • Save p-ja/b89a8c5320aa73ff756c4bf69621d294 to your computer and use it in GitHub Desktop.

Select an option

Save p-ja/b89a8c5320aa73ff756c4bf69621d294 to your computer and use it in GitHub Desktop.
RetireJS report for Java/Maven applications

RetireJS for Maven projects

If you've got a Maven project containing JavaScript dependencies (usually some legacy Java web application), you can run vulnerability scan against it.

The script is based on https://retirejs.github.io/retire.js/

Run in main folder, where src/ is located.

#!/usr/bin/env bash
mkdir -p target && retire --outputformat text --path ./src &> target/retire.txt
# Optionally, format for better readability
sed -i -e 's/ severity: /\n severity: /g' -e "s|^$(pwd)|\n|g" target/retire.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment