Arka
Arka

Reputation: 101

Regular expression in filter method in /sbom in CDXGEN library

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?

Upvotes: 0

Views: 57

Answers (0)

Related Questions