(new) Call security context validators during action-set validation #927
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
| ## | |
| ## Copyright (c) 2025-2026 The Johns Hopkins University Applied Physics | |
| ## Laboratory LLC. | |
| ## | |
| ## This file is part of the Bundle Protocol Security Library (BSL). | |
| ## | |
| ## Licensed under the Apache License, Version 2.0 (the "License"); | |
| ## you may not use this file except in compliance with the License. | |
| ## You may obtain a copy of the License at | |
| ## http://www.apache.org/licenses/LICENSE-2.0 | |
| ## Unless required by applicable law or agreed to in writing, software | |
| ## distributed under the License is distributed on an "AS IS" BASIS, | |
| ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| ## See the License for the specific language governing permissions and | |
| ## limitations under the License. | |
| ## | |
| ## This work was performed for the Jet Propulsion Laboratory, California | |
| ## Institute of Technology, sponsored by the United States Government under | |
| ## the prime contract 80NM0018D0004 between the Caltech and NASA under | |
| ## subcontract 1700763. | |
| ## | |
| name: Packages | |
| on: | |
| workflow_dispatch: {} # manual trigger | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| push: | |
| branches: | |
| - main | |
| pull_request: {} # any target | |
| jobs: | |
| rpm-build: | |
| name: Build RPM packages (RHEL-9) | |
| runs-on: ubuntu-latest | |
| container: quay.io/centos/centos:stream9 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Set up OS | |
| run: | | |
| dnf config-manager --set-enabled crb | |
| dnf install -y epel-release | |
| dnf install -y \ | |
| tito rpm-build rpmlint | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2.22 | |
| with: | |
| create-symlink: true | |
| - name: Dependencies | |
| run: dnf builddep -y bsl.spec | |
| - name: Build | |
| run: ./build.sh rpm-build | |
| - name: Check | |
| run: ./build.sh rpm-check | |
| - name: Summarize Results | |
| if: always() | |
| run: | | |
| echo "## rpmlint results:" >> $GITHUB_STEP_SUMMARY | |
| echo >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| cat build/default/pkg/rpmlint.txt >> $GITHUB_STEP_SUMMARY || true | |
| echo >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| - name: Archive packages | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: bsl-rpm | |
| path: | | |
| build/default/pkg/*.rpm | |
| build/default/pkg/*/*.rpm | |
| build/default/pkg/rpmlint.txt | |
| retention-days: 1 | |
| rpm-install: | |
| name: Install RPM packages (RHEL-9) | |
| needs: rpm-build | |
| runs-on: ubuntu-latest | |
| container: quay.io/centos/centos:stream9 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Set up OS | |
| run: | | |
| dnf config-manager --set-enabled crb | |
| dnf install -y epel-release | |
| dnf install -y python3-pip python3-wheel gcc pkgconf-pkg-config | |
| - name: Download packages | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: bsl-rpm | |
| - name: Install | |
| run: dnf install -y x86_64/bsl*.rpm | |
| - name: Unit tests | |
| run: | | |
| FAILURES=0 | |
| for TESTEXEC in /usr/libexec/bsl/test_* | |
| do | |
| $TESTEXEC || FAILURES=$(($FAILURES + 1)) | |
| done | |
| exit $FAILURES | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| # root files and test subtree | |
| sparse-checkout: | | |
| mock-bpa-test | |
| lib-user-test | |
| - name: Trial build | |
| run: | | |
| pkg-config --print-provides --print-requires bsl | |
| mkdir build | |
| gcc -c $(pkg-config --cflags bsl) -o build/example.o lib-user-test/main.c | |
| gcc $(pkg-config --libs bsl) -o build/example build/example.o | |
| ./build/example | |
| - name: Mock BPA tests | |
| run: | | |
| pip3 install -r mock-bpa-test/requirements.txt | |
| python3 -m pytest mock-bpa-test |