feat(slicing): emit param annotations as separate ANNOTATION slices (… #626
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: repotests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| jvm-testing: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, windows-latest] | |
| java-version: ['21', '25'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'ShiftLeftSecurity/shiftleft-java-example' | |
| path: 'repotests/shiftleft-java-example' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'rodbate/bouncycastle-examples' | |
| path: 'repotests/bouncycastle-examples' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'juice-shop/juice-shop' | |
| path: 'repotests/juice-shop' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'ShiftLeftSecurity/shiftleft-ts-example' | |
| path: 'repotests/shiftleft-ts-example' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'libexpat/libexpat' | |
| path: 'repotests/libexpat' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'HooliCorp/java-sec-code' | |
| path: 'repotests/java-sec-code' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'HooliCorp/DjanGoat' | |
| path: 'repotests/DjanGoat' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'DefectDojo/django-DefectDojo' | |
| path: 'repotests/django-DefectDojo' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'nodejs/node' | |
| path: 'repotests/nodejs' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'awsdocs/aws-doc-sdk-examples' | |
| path: 'repotests/aws-doc-sdk-examples' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'bionomia/bionomia' | |
| path: 'repotests/bionomia' | |
| ref: '5ada8b5f4a5f68561a7195e2badc2f744dc4676e' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'OWASP/railsgoat' | |
| path: 'repotests/railsgoat' | |
| ref: 'c1e8ff1e3b24a1c48fcfc9fbee0f65dc296b49d9' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'playframework/play-samples' | |
| path: 'repotests/play-samples' | |
| ref: '0dccba17856e89dbb5e457ab760efb14cc691395' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'aboutcode-org/dejacode' | |
| path: 'repotests/dejacode' | |
| ref: 'v5.4.0' | |
| - uses: coursier/cache-action@v6 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java-version }} | |
| - uses: sbt/setup-sbt@v1 | |
| - uses: coursier/setup-action@v1 | |
| with: | |
| apps: scala3 scalac | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '25.x' | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| coverage: "none" | |
| php-version: "8.3" | |
| tools: composer:v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '4.0.0' | |
| bundler-cache: false | |
| if: runner.os != 'Windows' | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.4.8' | |
| bundler-cache: false | |
| if: runner.os == 'Windows' | |
| - name: Install sbt | |
| run: brew install sbt | |
| if: runner.os == 'macOS' | |
| - run: | | |
| sbt stage createDistribution | |
| python -m pip install atom-tools | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF-8" | |
| - run: | | |
| cd wrapper/nodejs | |
| bash build.sh | |
| npm install -g . | |
| npm install -g @appthreat/atom-parsetools | |
| cd ../.. | |
| ./atom.sh --remove-atom -o /tmp/java.atom -l java $GITHUB_WORKSPACE/repotests/shiftleft-java-example -Dlog4j.configurationFile=log4j2.xml | |
| ./atom.sh --remove-atom -o /tmp/juice.atom -l js $GITHUB_WORKSPACE/repotests/juice-shop -Dlog4j.configurationFile=log4j2.xml | |
| ./atom.sh --remove-atom -o /tmp/ts.atom -l js $GITHUB_WORKSPACE/repotests/shiftleft-ts-example -Dlog4j.configurationFile=log4j2.xml -x --export-dir ts_gml_exports | |
| ls -l ts_gml_exports | |
| rm -rf ts_gml_exports | |
| ./atom.sh --remove-atom -o /tmp/dejacode.atom -l python $GITHUB_WORKSPACE/repotests/dejacode -Dlog4j.configurationFile=log4j2.xml -x --export-dir deja_gml_exports | |
| ./atom.sh --remove-atom -o /tmp/py.atom -l python $GITHUB_WORKSPACE/repotests/DjanGoat -Dlog4j.configurationFile=log4j2.xml -x --export-dir py_gml_exports | |
| ls -l py_gml_exports | |
| rm -rf py_gml_exports | |
| ./atom.sh parsedeps --remove-atom -o /tmp/py.atom -l python $GITHUB_WORKSPACE/repotests/DjanGoat -Dlog4j.configurationFile=log4j2.xml | |
| ./atom.sh --remove-atom -o /tmp/py2.atom -l python $GITHUB_WORKSPACE/repotests/django-DefectDojo -Dlog4j.configurationFile=log4j2.xml | |
| ./atom.sh --remove-atom -o /tmp/c.atom -l c $GITHUB_WORKSPACE/repotests/libexpat -Dlog4j.configurationFile=log4j2.xml -x --export-dir gml_exports | |
| ./atom.sh --remove-atom -o /tmp/railsgoat.atom -l ruby $GITHUB_WORKSPACE/repotests/railsgoat -Dlog4j.configurationFile=log4j2.xml -x --export-dir rb_gml_exports | |
| ls -l rb_gml_exports | |
| rm -rf rb_gml_exports | |
| ./atom.sh --remove-atom -o /tmp/bionomia.atom -l ruby $GITHUB_WORKSPACE/repotests/bionomia -Dlog4j.configurationFile=log4j2.xml | |
| ./atom.sh data-flow --remove-atom -o /tmp/java2.atom -l java $GITHUB_WORKSPACE/repotests/shiftleft-java-example -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/java.slices.json | |
| # ./atom.sh data-flow --remove-atom -o /tmp/juice2.atom -l js $GITHUB_WORKSPACE/repotests/juice-shop -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/juice.slices.json | |
| ./atom.sh data-flow --remove-atom -o /tmp/ts2.atom -l js $GITHUB_WORKSPACE/repotests/shiftleft-ts-example -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/ts.slices.json | |
| ./atom.sh data-flow --remove-atom -o /tmp/py2.atom -l python $GITHUB_WORKSPACE/repotests/DjanGoat -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/py.slices.json | |
| ./atom.sh data-flow --sink-filter ".*print.*" --remove-atom -o /tmp/c2.atom -l c $GITHUB_WORKSPACE/repotests/libexpat -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/c.slices.json | |
| ./atom.sh usages --remove-atom -o /tmp/java3.atom -l java $GITHUB_WORKSPACE/repotests/shiftleft-java-example -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/java.usages.json | |
| # ./atom.sh usages --remove-atom -o /tmp/juice3.atom -l js $GITHUB_WORKSPACE/repotests/juice-shop -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/juice.usages.json | |
| ./atom.sh usages --remove-atom -o /tmp/ts3.atom -l js $GITHUB_WORKSPACE/repotests/shiftleft-ts-example -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/ts.usages.json | |
| ./atom.sh usages --extract-endpoints --remove-atom -o /tmp/dejacode.atom -l python $GITHUB_WORKSPACE/repotests/dejacode -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/dejacode.usages.json | |
| ./atom.sh usages --extract-endpoints --remove-atom -o /tmp/py3.atom -l python $GITHUB_WORKSPACE/repotests/DjanGoat -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/py.usages.json | |
| ./atom.sh usages --remove-atom -o /tmp/py4.atom -l python $GITHUB_WORKSPACE/repotests/django-DefectDojo -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/py4.usages.json | |
| ./atom.sh usages --remove-atom -o /tmp/c3.atom -l c $GITHUB_WORKSPACE/repotests/libexpat -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/c.usages.json | |
| ./atom.sh usages --extract-endpoints --remove-atom -o /tmp/railsgoat2.atom -l ruby $GITHUB_WORKSPACE/repotests/railsgoat -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/railsgoat2.usages.json | |
| ./atom.sh usages --remove-atom -o /tmp/bionomia2.atom -l ruby $GITHUB_WORKSPACE/repotests/bionomia -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/bionomia2.usages.json | |
| ./atom.sh --remove-atom -o /tmp/java-sec-code.atom -l java $GITHUB_WORKSPACE/repotests/java-sec-code -Dlog4j.configurationFile=log4j2.xml -x --export-dir gml_exports | |
| ls -l gml_exports | |
| rm -rf gml_exports | |
| ./atom.sh --remove-atom -o /tmp/play-scala-slick-example.atom -l scala $GITHUB_WORKSPACE/repotests/play-samples/play-scala-slick-example | |
| ls -lh $GITHUB_WORKSPACE/repotests/play-samples/play-scala-slick-example | |
| ./atom.sh --remove-atom -o /tmp/play-scala-rest-api-example.atom -l scala $GITHUB_WORKSPACE/repotests/play-samples/play-scala-rest-api-example | |
| ./atom.sh usages --extract-endpoints --remove-atom -o /tmp/play-scala-rest-api-example.atom -l scala $GITHUB_WORKSPACE/repotests/play-samples/play-scala-rest-api-example --slice-outfile /tmp/scala-rest.usages.json | |
| ls -lh $GITHUB_WORKSPACE/repotests/play-samples/play-scala-rest-api-example | |
| ./atom.sh --remove-atom -o /tmp/play-scala-grpc-example.atom -l scala $GITHUB_WORKSPACE/repotests/play-samples/play-scala-grpc-example | |
| ls -lh $GITHUB_WORKSPACE/repotests/play-samples/play-scala-grpc-example | |
| ls -lh . | |
| if: runner.os != 'Windows' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF-8" | |
| - run: | | |
| cd wrapper/nodejs | |
| copy ..\..\target\atom.zip plugins\ | |
| Expand-Archive -Path ..\..\target\atom.zip -DestinationPath plugins\ -Force | |
| Remove-Item -Force plugins\atom.zip | |
| npm install -g . | |
| npm install -g @appthreat/atom-parsetools | |
| cd ../.. | |
| .\atom.bat usages --remove-atom -o $env:GITHUB_WORKSPACE\\repotests\\juice-shop\\jshop.atom -l js $env:GITHUB_WORKSPACE\\repotests\\juice-shop --slice-outfile $env:GITHUB_WORKSPACE\\repotests\\juice-shop\\jshop.usages.json | |
| .\atom.bat usages --extract-endpoints --remove-atom -o $env:GITHUB_WORKSPACE\\repotests\\DjanGoat\\py3.atom -l python $env:GITHUB_WORKSPACE\\repotests\\DjanGoat --slice-outfile $env:GITHUB_WORKSPACE\\repotests\\DjanGoat\\py.usages.json | |
| if: runner.os == 'Windows' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF-8" | |
| - run: | | |
| npm install -g @cyclonedx/cdxgen --omit=optional | |
| cdxgen -t java --deep -o $GITHUB_WORKSPACE/repotests/bouncycastle-examples/bom.json $GITHUB_WORKSPACE/repotests/bouncycastle-examples | |
| ./atom.sh reachables --include-crypto --remove-atom -o /tmp/bouncycastle-examples.atom -l java $GITHUB_WORKSPACE/repotests/bouncycastle-examples -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/bouncycastle-examples.reachables.json | |
| cdxgen -t java --deep -o $GITHUB_WORKSPACE/repotests/java-sec-code/bom.json $GITHUB_WORKSPACE/repotests/java-sec-code | |
| ./atom.sh reachables --sink-tag framework-output --include-crypto --remove-atom -o /tmp/java-sec-code.atom -l java $GITHUB_WORKSPACE/repotests/java-sec-code -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/java-sec-code.reachables.json | |
| cdxgen -t c --deep -o $GITHUB_WORKSPACE/repotests/aws-doc-sdk-examples/cpp/bom.json $GITHUB_WORKSPACE/repotests/aws-doc-sdk-examples/cpp | |
| ./atom.sh reachables --remove-atom -o /tmp/aws-doc-sdk-examples.atom -l c $GITHUB_WORKSPACE/repotests/aws-doc-sdk-examples/cpp -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/aws-doc-sdk-examples.reachables.json | |
| cdxgen -t python --deep -o $GITHUB_WORKSPACE/repotests/DjanGoat/bom.json $GITHUB_WORKSPACE/repotests/DjanGoat | |
| ./atom.sh reachables --remove-atom -o /tmp/DjanGoat.atom -l python $GITHUB_WORKSPACE/repotests/DjanGoat -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/DjanGoat.reachables.json | |
| if: runner.os != 'Windows' | |
| env: | |
| JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF-8" |