private boolean isAmongAggregatedModules(LibraryId _libid) { for(Application prj: this.modules) { if(prj.getMvnGroup().equals(_libid.getMvnGroup()) && prj.getArtifact().equals(_libid.getArtifact()) && prj.getVersion().equals(_libid.getVersion())) return true; } return false; }
private boolean ignoreUnassessed(VulnerableDependency _a) { if(this.ignoreUnassessed.equalsIgnoreCase(IGN_UNASS_OFF)) return false; else if(this.ignoreUnassessed.equalsIgnoreCase(IGN_UNASS_ALL)) return !_a.isAffectedVersionConfirmed(); else return !_a.isAffectedVersionConfirmed() && _a.getDep().getLib().isWellknownDigest(); }
public Dependency getDependency(@NotNull String _sha1) { for(Dependency d: this.getDependencies()) { if(d.getLib()!=null && d.getLib().getDigest().equals(_sha1)) { return d; } } return null; } public Collection<Dependency> getDependencies() { return dependencies; }
public ConstructFixContainmentCheck(ConstructId _c, JarAnalyzer _ja, ConstructChange _cc) { this.constructId = _c; this.ja = _ja; this.repo = _cc.getRepo(); this.repoPath = _cc.getRepoPath(); this.commit = _cc.getCommit(); }
@Override public String toString() { final StringBuffer b = new StringBuffer(); b.append("[app=").append(this.app.toString()).append(", lib=").append(this.lib.toString()).append(", filename=").append(this.filename).append(", scope=").append(this.scope).append(", trans=").append(this.getTransitive()).append("]"); return b.toString(); } }
/** * Returns a {@link LibraryId} corresponding to this {@link ResponseDoc}. * @param _libid * @return */ public Artifact toArtifact() { Artifact r = new Artifact(g,a,v); r.setTimestamp(timestamp); r.setProgrammingLanguage(ProgrammingLanguage.JAVA); return r; }
public Space(String _t, String _n, String _d) { this.setSpaceToken(_t); this.setSpaceName(_n); this.setSpaceDescription(_d); }
public com.sap.psr.vulas.shared.json.model.LibraryId toSharedType() { return new com.sap.psr.vulas.shared.json.model.LibraryId(this.mvnGroup, this.artifact, this.version); } }
/** * Returns true if the library has a digest and a digest algorithm, false otherwise. * @return */ public boolean hasValidDigest() { return this.getDigest()!=null && this.getDigestAlgorithm()!=null; }
public VulnerableDependency(Dependency d, Bug b){ super(); this.dep = d; this.bug = b; this.evalAffectedVersion(); }
public String getMajorRelease() { return this.version.getMajorRelease(); // String[] versions = this.version.split("\\."); // return (versions.length>0)?versions[0]:"0"; }
public String getMaintenanceRelease() { return this.version.getMaintenanceRelease(); // String[] versions = this.version.split("\\."); // String majorRelease=(versions.length>0)?versions[0]:"0"; // String minorRelease = majorRelease.concat(".".concat((versions.length>1)?versions[1]:"0")); // return minorRelease.concat(".".concat((versions.length>2)?versions[2]:"0")); // }
@Override public final String toString() { return this.toString(false); }
@Override public final String toString() { return this.toString(false); }
@Override public final String toString() { return this.toString(false); }