Support for regex in filter object while running /sbom #1261
Unanswered
arkajnag23
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using CDXGEN server mode and using POST method (/sbom) to generate the SBOM.
I have multi module Maven projects which includes Angular JS + Maven; CDXGEN seems to generate the sbom with required components.
But now, I want to exclude certain groups/artifacts to generate the filtered SBOM.
As I want to exclude hence I tried using negative lookahead with regular expression, like below:
curl -X POST http://localhost:9090/sbom \ -H "Content-Type: application/json" \ -d '{ "path": "/var/<workspace path>", "type": "maven,js", "multiProject": true, "resolveTransitive": true, "recurse": true, "installDeps": true, "filter": "^(?!.*(abc\\|test|)).*$" }'
While going through the source code, it seems the filterBom method, doesn't support Regular Expression.
Can someone provide some support on the same?
Beta Was this translation helpful? Give feedback.
All reactions