action.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. wget -O- https://github.com/vc-teahouse/Baseband-guard/raw/main/setup.sh | bash
  11. attempts: 5
  12. delay: 5
  13. workdir: ${{ github.workspace }}/kernel
  14. - name: Configure Baseband Guard
  15. shell: bash
  16. working-directory: ${{ github.workspace }}/kernel
  17. run: |
  18. # Modify security Kconfig to include baseband_guard in LSM
  19. sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/selinux/selinux,baseband_guard/ } }' common/security/Kconfig
  20. - name: Verify BBG Installation
  21. shell: bash
  22. working-directory: ${{ github.workspace }}/kernel
  23. run: |
  24. if grep -q "baseband_guard" common/security/Kconfig; then
  25. echo "✓ SUCCESS: baseband_guard found in common/security/Kconfig"
  26. grep -n "baseband_guard" common/security/Kconfig || true
  27. else
  28. echo "✗ FAILED: baseband_guard not found in common/security/Kconfig"
  29. exit 1
  30. fi
  31. - name: Extract BBG Version
  32. shell: bash
  33. working-directory: ${{ github.workspace }}/kernel/Baseband-guard
  34. run: |
  35. # Extract and export BBG version info
  36. BBG_COMMIT=$(git rev-parse --short HEAD 2>/dev/null)
  37. echo "BBG_COMMIT=$BBG_COMMIT" >> $GITHUB_ENV
  38. - name: Enable Kernel Configs
  39. uses: ./.github/actions/set-kernel-config
  40. with:
  41. config_list: |
  42. CONFIG_BBG=y