원클릭으로
maven-vuln-fix
Query and fix Maven dependency vulnerabilities reported by GitHub Dependabot using OSV API
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Query and fix Maven dependency vulnerabilities reported by GitHub Dependabot using OSV API
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | maven-vuln-fix |
| description | Query and fix Maven dependency vulnerabilities reported by GitHub Dependabot using OSV API |
| source | auto-skill |
| extracted_at | 2026-06-22T02:45:26.806Z |
When GitHub reports Dependabot vulnerabilities on a Maven project, the security page often requires authentication to view details. Use the OSV (Open Source Vulnerabilities) API to identify and fix them.
mvn dependency:tree 2>&1 | grep -v '^\[INFO\] ---' | grep -v 'BUILD'
For each dependency in pom.xml, query the OSV API:
curl -s -X POST https://api.osv.dev/v1/query \
-H "Content-Type: application/json" \
-d '{"package":{"name":"<groupId>:<artifactId>","ecosystem":"Maven"},"version":"<version>"}' \
| python3 -m json.tool
{} response means no known vulnerabilities."vulns" array contains CVE details, affected versions, and the "fixed" version.for pkg in "groupId:artifactId:version" ...; do
name=$(echo $pkg | cut -d: -f1,2)
ver=$(echo $pkg | cut -d: -f3)
result=$(curl -s -X POST https://api.osv.dev/v1/query \
-H "Content-Type: application/json" \
-d "{\"package\":{\"name\":\"$name\",\"ecosystem\":\"Maven\"},\"version\":\"$ver\"}")
if [ "$result" != "{}" ]; then
echo "=== VULNERABLE: $name:$ver ==="
echo "$result" | python3 -m json.tool | head -40
fi
done
Edit pom.xml to bump each vulnerable dependency to its "fixed" version from the OSV response.
mvn clean compile
mvn test
If ~/.m2/settings.xml uses http://maven.aliyun.com/nexus/content/groups/public (HTTP, not HTTPS), new artifacts may return 403 Forbidden. Fix by changing the mirror URL to HTTPS:
<url>https://maven.aliyun.com/nexus/content/groups/public</url>
Or temporarily use a custom settings file:
mvn clean compile -s /path/to/https-settings.xml
| Field | Meaning |
|---|---|
aliases | CVE identifiers (e.g., CVE-2025-7962) |
summary | Short description |
database_specific.severity | MODERATE, HIGH, CRITICAL |
affected[].ranges[].events | introduced and fixed version pairs |