action.yml 1.6 KB

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