Skip to content

Commit

Permalink
More Ruby reach tests (#1577)
Browse files Browse the repository at this point in the history
* More Ruby tests

Signed-off-by: Prabhu Subramanian <[email protected]>

---------

Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu authored Jan 17, 2025
1 parent e33469f commit 3fa62c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/java-reachables-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
name: bomresults
path: bomresults

ruby-sample1:
ruby-samples:
strategy:
fail-fast: false
matrix:
Expand All @@ -79,15 +79,24 @@ jobs:
repository: 'OWASP/railsgoat'
path: 'repotests/railsgoat'
ref: 'c1e8ff1e3b24a1c48fcfc9fbee0f65dc296b49d9'
- name: generate deep sbom
- name: generate reachables sbom - bionomia
run: |
cd repotests/bionomia
docker run --rm -e CDXGEN_DEBUG_MODE -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-debian-ruby33:v11 -r /app -o /app/bom.json -t ruby --profile research
ls -lh
mkdir -p $GITHUB_WORKSPACE/rubyresults/bionomia
cd repotests/bionomia
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-debian-ruby33:v11 -r /app -o /app/bom.json -t ruby --profile research
cp bom.json *.slices.json $GITHUB_WORKSPACE/rubyresults/bionomia
env:
CDXGEN_DEBUG_MODE: debug
- name: generate reachables sbom - railsgoat
run: |
mkdir -p $GITHUB_WORKSPACE/rubyresults/railsgoat
cd repotests/railsgoat
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-debian-ruby26:v11 -r /app -o /app/bom.json -t ruby --profile research
cp bom.json *.slices.json $GITHUB_WORKSPACE/rubyresults/railsgoat
- name: generate reachables sbom - campsite
run: |
mkdir -p $GITHUB_WORKSPACE/rubyresults/campsite
cd repotests/campsite/api
docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-debian-ruby34:v11 -r /app -o /app/bom.json -t ruby --profile research
cp bom.json *.slices.json $GITHUB_WORKSPACE/rubyresults/campsite
- uses: actions/upload-artifact@v4
with:
name: rubyresults
Expand Down
3 changes: 2 additions & 1 deletion lib/evinser/evinser.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ export async function createSlice(
// Support for crypto slices aka CBOM
if (sliceType === "reachables" && options.includeCrypto) {
args.push("--include-crypto");
} else if (sliceType === "usages") {
}
if (sliceType === "usages" || ["ruby"].includes(language)) {
args.push("--remove-atom");
}
args = args.concat([
Expand Down

0 comments on commit 3fa62c7

Please sign in to comment.