Skip to content

Commit bb0a399

Browse files
authored
Adds occurrence evidence for swift (#1442)
* Adds occurrence evidence for swift Signed-off-by: Prabhu Subramanian <[email protected]> * Bug fix Signed-off-by: Prabhu Subramanian <[email protected]> --------- Signed-off-by: Prabhu Subramanian <[email protected]>
1 parent ab161c3 commit bb0a399

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+59844
-433
lines changed

.github/workflows/repotests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,8 @@ jobs:
403403
shell: bash
404404
- name: repotests swift-markdown
405405
run: |
406-
CDXGEN_DEBUG_MODE=debug bin/cdxgen.js -p -r -t swift repotests/swift-markdown -o bomresults/bom-swift.json --validate
406+
CDXGEN_DEBUG_MODE=debug bin/cdxgen.js -p -r -t swift repotests/swift-markdown -o bomresults/bom-swift.json
407+
CDXGEN_DEBUG_MODE=debug bin/cdxgen.js -p -r -t swift repotests/swift-markdown -o bomresults/bom-swift.json --profile research
407408
shell: bash
408409
- name: repotests microservices-demo
409410
if: matrix.os == 'windows-latest'

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
23

bin/cdxgen.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,14 @@ const args = yargs(hideBin(process.argv))
202202
default: "reachables.slices.json",
203203
hidden: true,
204204
})
205+
.option("semantics-slices-file", {
206+
description: "Path for the semantics slices file.",
207+
default: "semantics.slices.json",
208+
hidden: true,
209+
})
205210
.option("spec-version", {
206-
description: "CycloneDX Specification version to use. Defaults to 1.5",
207-
default: 1.5,
211+
description: "CycloneDX Specification version to use. Defaults to 1.6",
212+
default: 1.6,
208213
type: "number",
209214
})
210215
.option("filter", {
@@ -380,7 +385,7 @@ if (options.includeFormulation) {
380385
/**
381386
* Method to apply advanced options such as profile and lifecycles
382387
*
383-
* @param {object} CLI options
388+
* @param {object} options CLI options
384389
*/
385390
const applyAdvancedOptions = (options) => {
386391
switch (options.profile) {
@@ -731,7 +736,7 @@ const checkPermissions = (filePath) => {
731736
printTable(bomNSData.bomJson);
732737
// CBOM related print
733738
if (options.includeCrypto) {
734-
console.log("*** Cryptography BOM ***");
739+
console.log("\n*** Cryptography BOM ***");
735740
printTable(bomNSData.bomJson, ["cryptographic-asset"]);
736741
printDependencyTree(bomNSData.bomJson, "provides");
737742
}

bin/evinse.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,15 @@ const args = yargs(hideBin(process.argv))
6363
"js",
6464
"ts",
6565
"javascript",
66+
"nodejs",
6667
"py",
6768
"python",
6869
"android",
6970
"c",
7071
"cpp",
7172
"php",
73+
"swift",
74+
"ios",
7275
],
7376
})
7477
.option("db-path", {
@@ -120,6 +123,11 @@ const args = yargs(hideBin(process.argv))
120123
description: "Use an existing reachables slices file.",
121124
default: "reachables.slices.json",
122125
})
126+
.option("semantics-slices-file", {
127+
description: "Use an existing semantics slices file.",
128+
default: "semantics.slices.json",
129+
hidden: true,
130+
})
123131
.option("print", {
124132
alias: "p",
125133
type: "boolean",
@@ -141,6 +149,7 @@ const args = yargs(hideBin(process.argv))
141149
.scriptName("evinse")
142150
.version()
143151
.help("h")
152+
.alias("h", "help")
144153
.wrap(Math.min(120, yargs().terminalWidth())).argv;
145154

146155
const evinseArt = `

ci/Dockerfile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL maintainer="cyclonedx" \
44
org.opencontainers.image.authors="Prabhu Subramanian <[email protected]>" \
55
org.opencontainers.image.source="https://github.com/cyclonedx/cdxgen" \
66
org.opencontainers.image.url="https://github.com/cyclonedx/cdxgen" \
7-
org.opencontainers.image.version="10.10.x" \
7+
org.opencontainers.image.version="10.11.x" \
88
org.opencontainers.image.vendor="cyclonedx" \
99
org.opencontainers.image.licenses="Apache-2.0" \
1010
org.opencontainers.image.title="cdxgen" \
@@ -21,9 +21,8 @@ ARG SBT_VERSION=1.10.2
2121
ARG MAVEN_VERSION=3.9.9
2222
ARG GRADLE_VERSION=8.10
2323
ARG GO_VERSION=1.23.1
24-
ARG NODE_VERSION=23.0.0
24+
ARG NODE_VERSION=23.1.0
2525
ARG PYTHON_VERSION=3.12
26-
ARG SOURCEKITTEN_VERSION=0.36.0
2726

2827
ENV GOPATH=/opt/app-root/go \
2928
JAVA_VERSION=$JAVA_VERSION \
@@ -113,14 +112,6 @@ RUN set -e; \
113112
&& chmod +x /usr/bin/swift \
114113
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
115114
&& swift --version \
116-
&& mkdir -p /opt/kitten \
117-
&& curl -L https://github.com/jpsim/SourceKitten/releases/download/${SOURCEKITTEN_VERSION}/SourceKitten-${SOURCEKITTEN_VERSION}.tar.gz -o /opt/kitten/SourceKitten.tar.gz \
118-
&& cd /opt/kitten/ && tar -xvf SourceKitten.tar.gz \
119-
&& cd /opt/kitten/SourceKitten-${SOURCEKITTEN_VERSION} \
120-
&& swift build -c release \
121-
&& cp /opt/kitten/SourceKitten-${SOURCEKITTEN_VERSION}/.build/release/sourcekitten /usr/local/bin/sourcekitten \
122-
&& cd /root && rm -rf /opt/kitten \
123-
&& sourcekitten --help \
124115
&& microdnf install -y epel-release \
125116
&& mkdir -p ${ANDROID_HOME}/cmdline-tools \
126117
&& curl -L https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -o ${ANDROID_HOME}/cmdline-tools/android_tools.zip \

ci/Dockerfile-bun

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL maintainer="cyclonedx" \
44
org.opencontainers.image.authors="Prabhu Subramanian <[email protected]>" \
55
org.opencontainers.image.source="https://github.com/cyclonedx/cdxgen" \
66
org.opencontainers.image.url="https://github.com/cyclonedx/cdxgen" \
7-
org.opencontainers.image.version="10.10.x" \
7+
org.opencontainers.image.version="10.11.x" \
88
org.opencontainers.image.vendor="cyclonedx" \
99
org.opencontainers.image.licenses="Apache-2.0" \
1010
org.opencontainers.image.title="cdxgen" \

ci/Dockerfile-deno

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL maintainer="cyclonedx" \
44
org.opencontainers.image.authors="Prabhu Subramanian <[email protected]>" \
55
org.opencontainers.image.source="https://github.com/cyclonedx/cdxgen" \
66
org.opencontainers.image.url="https://github.com/cyclonedx/cdxgen" \
7-
org.opencontainers.image.version="10.10.x" \
7+
org.opencontainers.image.version="10.11.x" \
88
org.opencontainers.image.vendor="cyclonedx" \
99
org.opencontainers.image.licenses="Apache-2.0" \
1010
org.opencontainers.image.title="cdxgen" \
@@ -22,7 +22,6 @@ ARG MAVEN_VERSION=3.9.9
2222
ARG GRADLE_VERSION=8.10
2323
ARG GO_VERSION=1.23.1
2424
ARG PYTHON_VERSION=3.12
25-
ARG SOURCEKITTEN_VERSION=0.36.0
2625

2726
ENV GOPATH=/opt/app-root/go \
2827
JAVA_VERSION=$JAVA_VERSION \
@@ -42,7 +41,7 @@ ENV GOPATH=/opt/app-root/go \
4241
ANDROID_HOME=/opt/android-sdk-linux \
4342
JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" \
4443
GLOBAL_NODE_MODULES_PATH=/root/.cache/deno/npm/registry.npmjs.org \
45-
CDXGEN_PLUGINS_DIR=/root/.cache/deno/npm/registry.npmjs.org/@cyclonedx/cdxgen-plugins-bin/1.6.3/plugins \
44+
CDXGEN_PLUGINS_DIR=/root/.cache/deno/npm/registry.npmjs.org/@cyclonedx/cdxgen-plugins-bin/1.6.4/plugins \
4645
SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
4746
SWIFT_PLATFORM=$SWIFT_PLATFORM \
4847
SWIFT_BRANCH=$SWIFT_BRANCH \
@@ -111,14 +110,6 @@ RUN set -e; \
111110
&& chmod +x /usr/bin/swift \
112111
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
113112
&& swift --version \
114-
&& mkdir -p /opt/kitten \
115-
&& curl -L https://github.com/jpsim/SourceKitten/releases/download/${SOURCEKITTEN_VERSION}/SourceKitten-${SOURCEKITTEN_VERSION}.tar.gz -o /opt/kitten/SourceKitten.tar.gz \
116-
&& cd /opt/kitten/ && tar -xvf SourceKitten.tar.gz \
117-
&& cd /opt/kitten/SourceKitten-${SOURCEKITTEN_VERSION} \
118-
&& swift build -c release \
119-
&& cp /opt/kitten/SourceKitten-${SOURCEKITTEN_VERSION}/.build/release/sourcekitten /usr/local/bin/sourcekitten \
120-
&& cd /root && rm -rf /opt/kitten \
121-
&& sourcekitten --help \
122113
&& microdnf install -y epel-release \
123114
&& mkdir -p ${ANDROID_HOME}/cmdline-tools \
124115
&& curl -L https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -o ${ANDROID_HOME}/cmdline-tools/android_tools.zip \

ci/Dockerfile-ppc64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL maintainer="cyclonedx" \
44
org.opencontainers.image.authors="Prabhu Subramanian <[email protected]>" \
55
org.opencontainers.image.source="https://github.com/cyclonedx/cdxgen" \
66
org.opencontainers.image.url="https://github.com/cyclonedx/cdxgen" \
7-
org.opencontainers.image.version="10.10.x" \
7+
org.opencontainers.image.version="10.11.x" \
88
org.opencontainers.image.vendor="cyclonedx" \
99
org.opencontainers.image.licenses="Apache-2.0" \
1010
org.opencontainers.image.title="cdxgen" \

ci/base-images/cdxgen/Dockerfile.python

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LABEL maintainer="CycloneDX" \
1111
org.opencontainers.image.description="Rolling image with cdxgen SBOM generator for Python 3.12 apps" \
1212
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-python:v10 -r /app --server"
1313

14-
ARG NODE_VERSION=23.0.0
14+
ARG NODE_VERSION=23.1.0
1515

1616
ENV NVM_DIR="/root/.nvm" \
1717
PYTHON_CMD=python3 \

ci/base-images/sle/Dockerfile.lang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM registry.suse.com/bci/python:3.12
33
ARG JAVA_VERSION=23-tem
44
ARG MAVEN_VERSION=3.9.9
55
ARG GCC_VERSION=13
6-
ARG NODE_VERSION=23.0.0
6+
ARG NODE_VERSION=23.1.0
77

88
ENV JAVA_VERSION=$JAVA_VERSION \
99
MAVEN_VERSION=$MAVEN_VERSION \

0 commit comments

Comments
 (0)