action.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: Setup Baseband Guard (BBG)
  2. description: Download and configure Baseband Guard security module
  3. runs:
  4. using: composite
  5. steps:
  6. - name: Install Baseband Guard
  7. uses: ./.github/actions/retry
  8. with:
  9. command: |
  10. set -o pipefail
  11. curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 30 https://raw.githubusercontent.com/vc-teahouse/Baseband-guard/main/setup.sh | bash
  12. attempts: 5
  13. delay: 5
  14. workdir: ${{ github.workspace }}/kernel
  15. - name: Configure Baseband Guard
  16. shell: bash
  17. working-directory: ${{ github.workspace }}/kernel
  18. run: |
  19. # Modify security Kconfig to include baseband_guard in LSM
  20. sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/selinux/selinux,baseband_guard/ } }' common/security/Kconfig
  21. - name: Verify BBG Installation
  22. shell: bash
  23. working-directory: ${{ github.workspace }}/kernel
  24. run: |
  25. if grep -q "baseband_guard" common/security/Kconfig; then
  26. echo "[+] SUCCESS: baseband_guard found in common/security/Kconfig"
  27. grep -n "baseband_guard" common/security/Kconfig || true
  28. else
  29. echo "[-] FAILED: baseband_guard not found in common/security/Kconfig"
  30. exit 1
  31. fi
  32. - name: Extract BBG Version
  33. shell: bash
  34. working-directory: ${{ github.workspace }}/kernel/Baseband-guard
  35. run: |
  36. # Extract and export BBG version info
  37. BBG_COMMIT=$(git rev-parse --short HEAD 2>/dev/null)
  38. echo "BBG_COMMIT=$BBG_COMMIT" >> $GITHUB_ENV
  39. - name: Enable Kernel Configs
  40. uses: ./.github/actions/set-kernel-config
  41. with:
  42. config_list: |
  43. CONFIG_BBG=y