Skip to content

Commit

Permalink
Merge pull request #85 from cisagov/lineage/skeleton
Browse files Browse the repository at this point in the history
Lineage pull request for: skeleton
  • Loading branch information
jsf9k authored Jan 24, 2025
2 parents 3f4b45d + bc353ee commit 26e8e01
Showing 1 changed file with 40 additions and 8 deletions.
48 changes: 40 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ jobs:
permissions:
# actions/checkout needs this to fetch code
contents: read
runs-on: ubuntu-latest
runs-on: ubuntu-${{ startsWith(matrix.architecture, 'arm') && '24.04-arm' || 'latest' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -205,13 +205,10 @@ jobs:
scenario:
- default
steps:
# With this task in place the GitHub runners run out of
# resources and crash. See cisagov/skeleton-ansible-role#211
# for more details.
# - uses: GitHubSecurityLab/actions-permissions/monitor@v1
# with:
# # Uses the organization variable unless overridden
# config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
with:
# Uses the organization variable unless overridden
config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
Expand Down Expand Up @@ -243,11 +240,46 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Disabling the unix-chkpwd AppArmor profile is necessary when
# running Molecule tests against Fedora 40 and 41; otherwise,
# the privileged container cannot successfully run sudo and
# hence Ansible is unable to do anything. See
# fedora-cloud/docker-brew-fedora#117 for more details.
#
# Purging firefox is currently necessary because the
# installation available on the GitHub runner instance provides
# two conflicting AppArmor profiles:
# /etc/apparmor.d/usr.bin.firefox and /etc/apparmor.d/firefox.
# This conflict causes the aa-disable /usr/sbin/unix_chkpwd
# command to fail.
#
# Purging passt is currently necessary because the installation
# available on the GitHub runner instance contains a wonky
# AppArmor file (/etc/apparmor.d/abstractions/passt) that causes
# the aa-disable command to fail.
#
# TODO: Remove the apt-get purge and systemctl reload commands
# when possible. See cisagov/skeleton-ansible-role#215 for more
# details.
- name: Disable unix-chkpwd AppArmor profile
run: |
sudo apt-get purge firefox passt
sudo systemctl reload apparmor.service
sudo apt-get install apparmor-utils
sudo aa-disable /usr/sbin/unix_chkpwd
if: ${{ startsWith(matrix.platform, 'fedora') }}
- name: Run molecule tests
run: >-
molecule test
--platform-name ${{ matrix.platform }}-${{ matrix.architecture }}
--scenario-name ${{ matrix.scenario }}
# TODO: Remove the apt-get install command when possible. See
# cisagov/skeleton-ansible-role#215 for more details.
- name: Re-enable unix-chkpwd AppArmor profile
run: |
sudo aa-enforce /usr/sbin/unix_chkpwd
sudo apt-get install firefox passt
if: ${{ startsWith(matrix.platform, 'fedora') }}
- name: Setup tmate debug session
uses: mxschmitt/action-tmate@v3
if: env.RUN_TMATE

0 comments on commit 26e8e01

Please sign in to comment.