Minor refacturing of the Python API #20
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: Generate SBOMs for python apps | |
| on: | |
| push: | |
| branches: [ "master", "v14-006-7" ] | |
| pull_request: | |
| branches: [ "master", "v14-006-7" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python 3.x | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.x" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install cyclonedx-bom | |
| - name: Create output directory | |
| run: | | |
| mkdir ~/output | |
| - name: MathTools - Generate SBOM | |
| working-directory: ./MathTools | |
| run: | | |
| python -m cyclonedx_py requirements > ~/output/MathTools.json | |
| - name: PositionLogger - Generate SBOM | |
| working-directory: ./PositionLogger | |
| run: | | |
| python -m cyclonedx_py requirements > ~/output/PositionLogger.json | |
| - name: ControlApp - Generate SBOM | |
| working-directory: ./control_python | |
| run: | | |
| python -m cyclonedx_py requirements > ~/output/control_python.json | |
| - name: MinimalApp - Generate SBOM | |
| working-directory: ./minimal_python | |
| run: | | |
| python -m cyclonedx_py requirements > ~/output/minimal_python.json | |
| - name: MonitorApp - Generate SBOM | |
| working-directory: ./monitor_python | |
| run: | | |
| python -m cyclonedx_py requirements > ~/output/monitor_python.json | |
| # export | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: SBOMs | |
| path: ~/output/ | |
| # Scan SBOMs for vulnerabilities | |
| - name: MathTools - Scan for vulnerabilities | |
| uses: anchore/scan-action@v7 | |
| with: | |
| sbom: ~/output/MathTools.json | |
| - name: PositionLogger - Scan for vulnerabilities | |
| uses: anchore/scan-action@v7 | |
| with: | |
| sbom: ~/output/PositionLogger.json | |
| - name: ControlApp - Scan for vulnerabilities | |
| uses: anchore/scan-action@v7 | |
| with: | |
| sbom: ~/output/control_python.json | |
| - name: MinimalApp - Scan for vulnerabilities | |
| uses: anchore/scan-action@v7 | |
| with: | |
| sbom: ~/output/minimal_python.json | |
| - name: MonitorApp - Scan for vulnerabilities | |
| uses: anchore/scan-action@v7 | |
| with: | |
| sbom: ~/output/monitor_python.json |