google / google/osv-scalibr

Better support for profiles in transitive Maven pom.xmls

Open
#463 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
644
Forks
201
Avg merge
2d 17h
Merged PRs (30d)
29

Description

Edit: I've transferred this issue from osv-scanner, since the relevant logic would now live here.

osv-scanner scan would correspond to the pomxmlnet Extractor. osv-scanner fix is the guided remediation feature.


Currently, osv-scanner scan does not activate any Maven profiles(?), and osv-scanner fix activates only profiles that are explicitly active by default.

For better profile support, we could:

  • Activate profiles that would naturally be activated (e.g. if the activation depends on a property)
  • Have a way for the user to give us the active profiles (analogous mvn's --activate-profiles/-P flag)
    • Related: possibly have something analogous to mvn's --define/-D flag to define properties outside of the pom.xml file
  • Figure out a way for getting/setting the JDK & OS versions for profile activation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the pomxmlnet Extractor and compare how osv-scanner scan and osv-scanner fix currently handle Maven profiles. Review the requested behavior for naturally activated profiles, user-supplied -P and -D values, and JDK or OS-based activation; done means agreeing on and implementing a defined profile-activation approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, java
Domain
security, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.