Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/providers/base_java.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export default class Base_Java {
if (targetDepth === srcDepth + 1) {
let from = this.parseDep(src);
let to = this.parseDep(target);
let matchedScope = target.match(/:compile|:provided|:runtime|:test|:system/g)
let matchedScopeSrc = src.match(/:compile|:provided|:runtime|:test|:system/g)
let matchedScope = target.match(/:compile|:provided|:runtime|:test|:system|:import/g)
let matchedScopeSrc = src.match(/:compile|:provided|:runtime|:test|:system|:import/g)
// only add dependency to sbom if it's not with test scope or if it's root
if ((matchedScope && matchedScope[0] !== ":test" && (matchedScopeSrc && matchedScopeSrc[0] !== ":test")) || (srcDepth == 0 && matchedScope && matchedScope[0] !== ":test")) {
sbom.addDependency(sbom.purlToComponent(from), to)
Expand Down
2 changes: 1 addition & 1 deletion src/providers/java_gradle.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export default class Java_gradle extends Base_java {
// Dependency line is of form String Notation
} else {
let depParts
if(depToBeIgnored.match(/^[a-z]+\s/)) {
if(depToBeIgnored.match(/^[a-zA-Z]+\s/)) {
depParts = depToBeIgnored.split(" ")[1].split(":");
}
else {
Expand Down