Skip to content

Commit 395968f

Browse files
authored
Merge pull request #12 from mfaquan/update-to-1.2.2320.0
Update public-api to 1.2.2320.0
2 parents 8d18ccf + 1d17e86 commit 395968f

19 files changed

Lines changed: 98 additions & 18 deletions

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Fortify Software Security Center Plugin API
22

3+
## Version 1.2.2320
4+
- Add setSBOMEntry() method to ScanBuilder
5+
- The plugin-api version 1.2 is only supported since SSC version 23.2.0
6+
37
## Version 1.1.2220
48
- Add optional ParserType element to IssueParser
59
- Bump schema and plugin-api version to 1.1

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ plugins {
44
id 'maven-publish'
55
id 'signing'
66
id 'io.github.gradle-nexus.publish-plugin' version '1.0.0'
7-
id "biz.aQute.bnd.builder" version "6.3.1"
7+
id "biz.aQute.bnd.builder" version "6.4.0"
88
}
99

1010
group 'com.fortify.plugin'
11-
version '1.1.2220.0'
11+
version '1.2.2320.0'
1212
description 'Fortify Plugin API'
1313

1414
apply from: 'bundle.gradle'

src/main/java/com/fortify/plugin/api/BasicVulnerabilityBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) Copyright 2017 Micro Focus or one of its affiliates.
2+
* Copyright 2017-2023 Open Text
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at

src/main/java/com/fortify/plugin/api/FortifyAnalyser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) Copyright 2017 Micro Focus or one of its affiliates.
2+
* Copyright 2017-2023 Open Text
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at

src/main/java/com/fortify/plugin/api/FortifyKingdom.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) Copyright 2017 Micro Focus or one of its affiliates.
2+
* Copyright 2017-2023 Open Text
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright 2023 Open Text
3+
*/
4+
5+
package com.fortify.plugin.api;
6+
7+
/**
8+
* The SBOM formats that SSC accepts.
9+
*/
10+
public enum SbomFormat {
11+
CYCLONEDX,
12+
SPDX,
13+
SWID;
14+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright 2023 Open Text
3+
*/
4+
5+
package com.fortify.plugin.api;
6+
7+
/**
8+
* The SBOM serializations that SSC accepts.
9+
*/
10+
public enum SbomSerialization {
11+
JSON,
12+
RDF_XML,
13+
XLSX,
14+
XML,
15+
YAML
16+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2023 Open Text
3+
*/
4+
5+
package com.fortify.plugin.api;
6+
7+
public enum SbomType {
8+
CYCLONEDX_JSON(SbomFormat.CYCLONEDX, SbomSerialization.JSON),
9+
CYCLONEDX_XML(SbomFormat.CYCLONEDX, SbomSerialization.XML),
10+
SPDX_RDFXML(SbomFormat.SPDX, SbomSerialization.RDF_XML),
11+
SPDX_JSON(SbomFormat.SPDX, SbomSerialization.JSON),
12+
SPDX_XLSX(SbomFormat.SPDX, SbomSerialization.XLSX),
13+
SPDX_XML(SbomFormat.SPDX, SbomSerialization.XML),
14+
SPDX_YAML(SbomFormat.SPDX, SbomSerialization.YAML),
15+
SWID_XML(SbomFormat.SWID, SbomSerialization.XML);
16+
17+
private SbomFormat format;
18+
private SbomSerialization serialization;
19+
SbomType(SbomFormat format, SbomSerialization serialization) {
20+
this.format = format;
21+
this.serialization = serialization;
22+
}
23+
24+
public SbomFormat getFormat() { return format; }
25+
public SbomSerialization getSerialization() { return serialization; }
26+
}

src/main/java/com/fortify/plugin/api/ScanBuilder.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*
2-
* (c) Copyright 2017 Micro Focus or one of its affiliates.
2+
* Copyright 2017-2023 Open Text
3+
*/
4+
/*
35
* Licensed under the Apache License, Version 2.0 (the "License");
46
* you may not use this file except in compliance with the License.
57
* You may obtain a copy of the License at
@@ -9,7 +11,7 @@
911
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1012
* See the License for the specific language governing permissions and
1113
* limitations under the License.
12-
*/
14+
*/
1315
package com.fortify.plugin.api;
1416

1517
import java.util.Date;
@@ -109,6 +111,15 @@ public interface ScanBuilder {
109111
*/
110112
ScanBuilder setEngineVersion(String engineVersion);
111113

114+
/**
115+
* Set the ScanEntry of the SBOM file in the scan file.
116+
* @param scanEntry scanEntry of the SBOM file.
117+
* @param sbomType format and serialization of the SBOM file.
118+
* @return reference to this ScanBuilder instance.
119+
* @since 1.2.2320.0 (SSC 23.2.0)
120+
*/
121+
ScanBuilder setSBOMEntry(ScanEntry scanEntry, SbomType sbomType);
122+
112123
/**
113124
* Complete scan build process and notify plugin framework that scan is ready to be passed to SSC.
114125
*/

src/main/java/com/fortify/plugin/api/ScanData.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*
2-
* (c) Copyright 2017 Micro Focus or one of its affiliates.
2+
* Copyright 2017-2023 Open Text
3+
*/
4+
/*
35
* Licensed under the Apache License, Version 2.0 (the "License");
46
* you may not use this file except in compliance with the License.
57
* You may obtain a copy of the License at
@@ -14,6 +16,7 @@
1416

1517
import java.io.IOException;
1618
import java.io.InputStream;
19+
import java.net.URL;
1720
import java.util.List;
1821
import java.util.function.Predicate;
1922

@@ -54,4 +57,11 @@ public interface ScanData {
5457
*/
5558
InputStream getInputStream(Predicate<String> matcher) throws IOException;
5659

60+
/**
61+
* Returns a URL for the specified ScanEntry
62+
* @param scanEntry
63+
* @return URL for the scan entry
64+
* @since 23.2.0
65+
*/
66+
URL getUrl(ScanEntry scanEntry);
5767
}

0 commit comments

Comments
 (0)