[NCL-9724] Fix CVEs - #727
Conversation
Mend Scan ResultsStatus: SCA scan outputSAST scan output |
bd9bf97 to
ccbd608
Compare
|
First migrated to maven scm provider v2, which brought more CVEs. |
645370f to
4a505b1
Compare
|
I've been looking at the original code and I hadn't realised it was also executing the git binary and only using maven-scm (and jgit) as a fallback. I'm not completely convinced by this in the sense the maven-scm stuff seems pointless - we don't support SVN so that is irrelevant now. I am not sure of the need to use maven-scm as opposed to using jgit directly. As for executing git, @akridl has a set of nice git execution functions in reqour that could be reused (and also he is using smallrye processexecutor which avoids pitfalls in the java process code. I would be tempted to add shallow clone to reqour, strip out all of the maven-scm code, and reuse reqour code here. ( cc @akridl @thescouser89 ) |
|
@rnc do you think it should be added to pnc-common? though, there is a lot of it |
|
@patrikk0123 Yes ; good question ; that probably should be discussed with @akridl and others offline on the best approach here. While your PR probably will fix the issue, I think it would be simpler to strip out all the maven-scm stuff entirely. |
|
@patrikk0123 I've had another look at reqour code - I would potentially agree that importing reqour core might be 'too much' and equally those commands are interleaved with other reqour code (specifically things like the process executor to make them hard to migrate elsewhere. However, perhaps some parts could be used as inspiration or some way to share, liaising with @akridl might be possible. I think using the smallrye ProcessBuilder is important to avoid pitfalls with the JDK one (Quarkus specifically migrated to it so its well tested). |
|
@rnc I agree with extracting Git "manipulation" codebase, ideally to PNC common, also with the process executor if that's generic enough for our organization or suitable for the DA. |
I think my point was the code might be too hard to extract and it's just using the smallrye process executor anyway... |
|
@rnc I introduced some of the Git commands in likeness to Reqour, including SmallRye ProcessBuilder. |
Checklist: