Update generator-generic-ossf-slsa3-publish.yml #8
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
| # It seems like you've shared a URL to a GitHub Actions workflow badge for a specific event (`create`) in your repository, `Sazwanismail/codespaces-react`. This badge likely shows the status (e.g., passing or failing) of the workflow defined in `generator-generic-ossf-slsa3-publish.yml`. | ||
| If you'd like assistance with: | ||
| 1. Understanding what the workflow does, | ||
| 2. Troubleshooting issues in the workflow, | ||
| 3. Modifying the workflow, | ||
| 4. Or anything else related to this, | ||
| Please clarify your query, and I'd be happy to help! anda merujuk kepada **SLSA (Supply-chain Levels for Software Artifacts)** peringkat 3 dan cara melaksanakannya dalam projek anda? Berikut adalah beberapa maklumat dan langkah yang mungkin berkaitan: | ||
| ### Apa itu SLSA 3? | ||
| **SLSA 3** adalah tahap ketiga dalam rangka kerja SLSA yang menumpukan pada membangun dan mengedarkan perisian dengan lebih selamat. Ia memerlukan: | ||
| 1. **Builds yang Diperakui**: Semua binaan perisian mesti disahkan oleh sistem binaan yang dipercayai. | ||
| 2. **Proses Automasi Penuh**: Tiada campur tangan manual dalam proses binaan atau pelepasan. | ||
| 3. **Metadata yang Terperinci**: Metadata binaan mesti dihasilkan secara automatik dan termasuk maklumat penting seperti siapa yang memulakan binaan. | ||
| ### Penggunaan dalam Projek GitHub | ||
| Untuk melaksanakan SLSA 3 dalam projek anda, anda boleh menggunakan sistem CI/CD seperti **GitHub Actions**. Biasanya, fail konfigurasi seperti `generator-generic-ossf-slsa3-publish.yml` digunakan untuk ini. | ||
| ### Jika Anda Merujuk Kepada Fail `generator-generic-ossf-slsa3-publish.yml` | ||
| Fail ini adalah sebahagian daripada automasi workflow untuk mencapai tahap SLSA 3. Namun, saya tidak dapat mengakses fail ini dalam repositori anda. Jika anda ingin saya bantu mengedit atau membuat fail ini dari awal, sila berikan maklumat berikut: | ||
| 1. **Komponen Projek**: Bahasa pengaturcaraan dan sistem binaan digunakan (contoh: Node.js, Python, Java). | ||
| 2. **Alat CI/CD**: Apakah alatan atau platform yang sedang digunakan (contoh: GitHub Actions, Jenkins)? | ||
| 3. **Keperluan Lanjut**: Adakah anda ingin menerbitkan pakej ke repositori tertentu seperti Docker Hub atau PyPI? | ||
| Saya sedia membantu anda melanjutkan dari sini! 😊is workflow uses actions that are not certified by GitHub. | ||
| # They are provided by a third-party and are governed by | ||
| # separate terms of service, privacy policy, and support | ||
| # documentation. | ||
| # This workflow lets you generate SLSA provenance file for your project. | ||
| # The generation satisfies level 3 for the provenance requirements - see https://slsa.dev/spec/v0.1/requirements | ||
| # The project is an initiative of the OpenSSF (openssf.org) and is developed at | ||
| # https://github.com/slsa-framework/slsa-github-generator. | ||
| # The provenance file can be verified using https://github.com/slsa-framework/slsa-verifier. | ||
| # For more information about SLSA and how it improves the supply-chain, visit slsa.dev. | ||
| name: SLSA generic generator | ||
| on: | ||
| workflow_dispatch: | ||
| release: | ||
| types: [created] | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| digests: ${{ steps.hash.outputs.digests }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| # ======================================================== | ||
| # | ||
| # Step 1: Build your artifacts. | ||
| # | ||
| # ======================================================== | ||
| - name: Build artifacts | ||
| run: | | ||
| # These are some amazing artifacts. | ||
| echo "artifact1" > artifact1 | ||
| echo "artifact2" > artifact2 | ||
| # ======================================================== | ||
| # | ||
| # Step 2: Add a step to generate the provenance subjects | ||
| # as shown below. Update the sha256 sum arguments | ||
| # to include all binaries that you generate | ||
| # provenance for. | ||
| # | ||
| # ======================================================== | ||
| - name: Generate subject for provenance | ||
| id: hash | ||
| run: | | ||
| set -euo pipefail | ||
| # List the artifacts the provenance will refer to. | ||
| files=$(ls artifact*) | ||
| # Generate the subjects (base64 encoded). | ||
| echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}" | ||
| provenance: | ||
| needs: [build] | ||
| permissions: | ||
| actions: read # To read the workflow path. | ||
| id-token: write # To sign the provenance. | ||
| contents: write # To add assets to a release. | ||
| uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | ||
| with: | ||
| base64-subjects: "${{ needs.build.outputs.digests }}" | ||
| upload-assets: true # Optional: Upload to a new release | ||