Skip to content

Update Development - #4

Merged
Sazwanismail merged 1 commit into
Sazwanismail-patch-3from
Sazwanismail-patch-4
Mar 16, 2026
Merged

Update Development#4
Sazwanismail merged 1 commit into
Sazwanismail-patch-3from
Sazwanismail-patch-4

Conversation

@Sazwanismail

@Sazwanismail Sazwanismail commented Mar 16, 2026

Copy link
Copy Markdown
Owner

User description

Building a SLSA3‑Compliant Development Workflow: A Practical Guide

You’ve asked to “Create development” – and that’s exactly what we’ll do. Below is a step‑by‑step blueprint for setting up a development environment and process that meets SLSA Level 3 requirements while remaining practical for everyday coding. This guide builds on everything we’ve discussed and gives you a concrete path forward.

🎯 Goal

Establish a development pipeline where every artifact (commits, builds, releases) carries verifiable proof of its origin and integrity, satisfying SLSA Build Level 3 and setting the foundation for higher levels.


📦 Phase 1: Repository Foundation

1.1 Enable Signed Commits

  • What: Require that every commit is signed with a GPG, SSH, or S/MIME key.
  • How:
    • Generate a signing key (GPG: gpg --full-generate-key).
    • Add the public key to your GitHub/GitLab account.
    • Configure Git locally: bash git config --global user.signingkey <key-id> git config --global commit.gpgsign true
  • Why: Establishes a chain of custody from developer to code, which is part of the source integrity expected by SLSA.

1.2 Branch Protection Rules

  • Require signed commits on all protected branches (main, release/*).
  • Require pull request reviews before merging.
  • Optionally require that all status checks pass (including any SLSA verification steps you add later).

1.3 Dependency Locking

  • Use lock files (go.sum, package-lock.json, Cargo.lock, etc.) to pin dependency versions.
  • Commit these lock files to the repository.

🛠️ Phase 2: Local Developer Environment

2.1 Containerized Development Environment

  • Provide a Dockerfile or Dev Container configuration that mirrors your CI build environment.
  • Example .devcontainer/devcontainer.json: json { "name": "MyApp Dev", "build": { "dockerfile": "Dockerfile" }, "features": { "ghcr.io/devcontainers/features/common-utils:2": {} } }
  • This ensures builds are reproducible and eliminates “works on my machine” discrepancies.

2.2 Pre‑commit Hooks for Security

  • Use pre-commit to run:
    • Dependency hash verification (e.g., check go.sum against a known good state).
    • Linting and static analysis.
    • Secret scanning (e.g., detect-secrets or truffleHog).
  • Example .pre-commit-config.yaml: ```yaml repos:
    • repo: local hooks: - id: verify-deps name: Verify dependencies entry: scripts/verify-deps.sh language: script files: '.*.(mod|sum|lock)$'
    • repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks:
      • id: detect-aws-credentials
      • id: detect-private-key ```

2.3 Local Build with Provenance (Optional but Recommended)

  • For testing, you can generate lightweight attestations using in-toto.
  • Example wrapper script local-build.sh: bash #!/bin/bash in-toto-run --step-name local-build --products myapp --key mykey -- ./build.sh
  • This creates a link file that you can keep locally for debugging.

🔁 Phase 3: Continuous Integration (CI) Pipeline

3.1 Reusable Build Workflow

Create a reusable workflow (.github/workflows/build.yml) that encapsulates your build steps and outputs artifact hashes.

name: Reusable Build

on:
  workflow_call:
    outputs:
      base64-subjects:
        description: "Base64-encoded subjects (artifacts with digests)"
        value: ${{ jobs.build.outputs.base64-subjects }}

jobs:
  build:
    runs-on: ubuntu-latest
    outputs:
      base64-subjects: ${{ steps.hashes.outputs.base64_subjects }}
    steps:
      - uses: actions/checkout@v4
      - run: make build
      - run: mkdir -p artifacts && cp bin/* artifacts/
      - id: hashes
        run: |
          cd artifacts
          subjects="[]"
          for file in *; do
            hash=$(sha256sum "$file" | cut -d' ' -f1)
            subjects=$(jq -c --arg name "$file" --arg hash "sha256:$hash" \
                      '. += [{"name": $name, "digest": $hash}]' <<< "$subjects")
          done
          echo "base64_subjects=$(echo -n "$subjects" | base64 -w0)" >> $GITHUB_OUTPUT
      - uses: actions/upload-artifact@v4
        with:
          name: build-artifacts-${{ github.run_id }}
          path: artifacts/

3.2 Main CI Workflow (PRs and Merges)

Create a main workflow (.github/workflows/ci.yml) that calls the reusable build and then verifies dependencies.

name: CI

on:
  pull_request:
  push:
    branches: [main]

permissions:
  contents: read
  id-token: write   # Needed if you verify provenance of dependencies

jobs:
  build:
    uses: ./.github/workflows/build.yml

  verify-deps:
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Download dependency provenance
        run: |
          # Example: verify a third-party binary used in build
          curl -LO https://example.com/dependency.bin
          curl -LO https://example.com/dependency.intoto.jsonl
          slsa-verifier verify-artifact \
            --provenance-path dependency.intoto.jsonl \
            --source-uri github.com/trusted-owner/dependency \
            --builder-id trusted-builder-id \
            dependency.bin

3.3 Release Workflow with SLSA3 Provenance

Create a separate workflow (.github/workflows/release.yml) triggered on tags or release publication.

name: Release

on:
  release:
    types: [published]

permissions:
  id-token: write
  attestations: write
  contents: write
  actions: read

jobs:
  build:
    uses: ./.github/workflows/build.yml

  provenance:
    needs: build
    uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
    with:
      base64-subjects: ${{ needs.build.outputs.base64-subjects }}
      upload-artifacts-name: build-artifacts-${{ github.run_id }}
      upload-assets: true

  verify-and-publish:
    needs: provenance
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v4
        with:
          name: build-artifacts-${{ github.run_id }}
          path: artifacts/

      - name: Verify provenance
        run: |
          gh attestation verify artifacts/myapp \
            --owner ${{ github.repository_owner }} \
            --signer-repo slsa-framework/slsa-github-generator

      - name: Upload to release
        run: |
          gh release upload ${{ github.event.release.tag_name }} artifacts/* provenance.json
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

🔐 Phase 4: Verification Gate Before Deployment

4.1 Deployment Job

In the release workflow (or a separate deployment workflow), add a final verification step:

deploy:
  needs: verify-and-publish
  runs-on: ubuntu-latest
  environment: production
  steps:
    - name: Verify attestation again (defense in depth)
      run: |
        gh attestation verify artifacts/myapp \
          --owner ${{ github.repository_owner }}
    - name: Deploy
      run: ./deploy.sh artifacts/

4.2 Enforce Verification in Production Environment

  • Configure GitHub Environments with required reviewers.
  • Optionally, use a deployment protection rule that calls an external verification service (e.g., via a custom GitHub Action).

📘 Phase 5: Developer Onboarding & Documentation

Create a CONTRIBUTING.md or DEVELOPMENT.md that covers:

  • How to set up the local environment (Docker, pre‑commit, signing keys).
  • How to run a local build that mimics CI.
  • How to interpret verification failures.
  • Where to find provenance files and how to manually verify them.

Example section:

## Verifying Artifacts Locally

After a CI build, you can download the provenance file from the workflow run and verify it:

```bash
gh attestation verify myapp --owner myorg

Or using the slsa-verifier tool:

slsa-verifier verify-artifact \
  --provenance-path provenance.json \ --source-uri github.com/myorg/myapp \ myapp

---

## 🧪 Phase 6: Testing the Pipeline

1. **Test a pull request**: Push a change, ensure the CI workflow runs, and that dependency verification passes.
2. **Create a pre‑release**: Tag a commit, push the tag, and trigger the release workflow. Download the artifacts and verify them manually.
3. **Simulate a tampering attempt**: Modify an artifact locally and try to verify it – the verification should fail.
4. **Rotate keys**: If using GPG for commit signing, practice rotating a developer key and updating the repository settings.

---

## 📈 Ongoing Maintenance

- Keep the SLSA generator version up to date (check for releases at [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator/releases)).
- Periodically review dependency verification rules.
- Update developer documentation as tooling evolves.

---

## 🎉 You’re Now SLSA3‑Ready

By following this guide, your development workflow will:
- Produce **non‑forgeable provenance** for every release.
- Ensure **source integrity** through signed commits.
- Provide **reproducible builds** via containerized environments.
- Build a **culture of security** where every developer understands and participates in supply chain protection.

This is a living process – adapt it to your team’s size, tech stack, and release cadence. And remember, the SLSA community is constantly improving tooling and practices; stay engaged to keep your pipeline cutting‑edge.

Would you like help with any specific part, such as setting up the containerized environment or writing the reusable workflow? I’m here to assist!

<!--
*** Please remove the following help text before submitting: ***

Pull requests without a rationale and clear improvement may be closed
immediately.

GUI-related pull requests should be opened against
https://github.com/bitcoin-core/gui
first. See CONTRIBUTING.md
-->

<!--
Please provide clear motivation for your patch and explain how it improves
Bitcoin Core user experience or Bitcoin Core developer experience
significantly:

* Any test improvements or new tests that improve coverage are always welcome.
* All other changes should have accompanying unit tests (see `src/test/`) or
  functional tests (see `test/`). Contributors should note which tests cover
  modified code. If no tests exist for a region of modified code, new tests
  should accompany the change.
* Bug fixes are most welcome when they come with steps to reproduce or an
  explanation of the potential issue as well as reasoning for the way the bug
  was fixed.
* Features are welcome, but might be rejected due to design or scope issues.
  If a feature is based on a lot of dependencies, contributors should first
  consider building the system outside of Bitcoin Core, if possible.
* Refactoring changes are only accepted if they are required for a feature or
  bug fix or otherwise improve developer experience significantly. For example,
  most "code style" refactoring changes require a thorough explanation why they
  are useful, what downsides they have and why they *significantly* improve
  developer experience or avoid serious programming bugs. Note that code style
  is often a subjective matter. Unless they are explicitly mentioned to be
  preferred in the [developer notes](/doc/developer-notes.md), stylistic code
  changes are usually rejected.
-->

<!--
Bitcoin Core has a thorough review process and even the most trivial change
needs to pass a lot of eyes and requires non-zero or even substantial time
effort to review. There is a huge lack of active reviewers on the project, so
patches often sit for a long time.
-->


___

## **CodeAnt-AI Description**
**Adopt SLSA3-focused development workflow guidance**

### What Changed
- Replaces platform-specific contributing/build instructions with a development workflow centered on SLSA Level 3 practices.
- Adds concrete, developer-facing steps: verify dependency provenance before builds, generate and verify lightweight attestations, containerize local builds for reproducibility, sign commits and tags, and run security scans early.
- Shows how to integrate provenance verification into CI (pre-merge checks) and gives a daily developer routine and onboarding checklist to ensure artifacts carry verifiable origin and integrity.

### Impact
`✅ Clearer supply-chain provenance for builds`
`✅ Fewer compromised dependencies reaching CI`
`✅ Shorter onboarding to produce reproducible, verifiable artifacts`
<details>
<summary><strong>💡 Usage Guide</strong></summary>

### Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

### Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
<pre>
<code>@codeant-ai ask: Your question here</code>
</pre>
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

#### Example
<pre>
<code>@codeant-ai ask: Can you suggest a safer alternative to storing this secret?</code>
</pre>

### Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
<pre>
<code>@codeant-ai: Your feedback here</code>
</pre>
This helps CodeAnt AI learn and adapt to your team's coding style and standards.

#### Example
<pre>
<code>@codeant-ai: Do not flag unused imports.</code>
</pre>

### Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
<pre>
<code>@codeant-ai: review</code>
</pre>

### Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at [https://app.codeant.ai](https://app.codeant.ai). This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

</details>

# Building a SLSA3‑Compliant Development Workflow: A Practical Guide

You’ve asked to “Create development” – and that’s exactly what we’ll do. Below is a **step‑by‑step blueprint** for setting up a development environment and process that meets SLSA Level 3 requirements while remaining practical for everyday coding. This guide builds on everything we’ve discussed and gives you a concrete path forward.

## 🎯 Goal
Establish a development pipeline where every artifact (commits, builds, releases) carries verifiable proof of its origin and integrity, satisfying SLSA Build Level 3 and setting the foundation for higher levels.

---

## 📦 Phase 1: Repository Foundation

### 1.1 Enable Signed Commits
- **What**: Require that every commit is signed with a GPG, SSH, or S/MIME key.
- **How**:
  - Generate a signing key (GPG: `gpg --full-generate-key`).
  - Add the public key to your GitHub/GitLab account.
  - Configure Git locally:  
    ```bash
    git config --global user.signingkey <key-id>
    git config --global commit.gpgsign true
    ```
- **Why**: Establishes a chain of custody from developer to code, which is part of the source integrity expected by SLSA.

### 1.2 Branch Protection Rules
- **Require signed commits** on all protected branches (main, release/*).
- **Require pull request reviews** before merging.
- **Optionally require** that all status checks pass (including any SLSA verification steps you add later).

### 1.3 Dependency Locking
- Use lock files (`go.sum`, `package-lock.json`, `Cargo.lock`, etc.) to pin dependency versions.
- Commit these lock files to the repository.

---

## 🛠️ Phase 2: Local Developer Environment

### 2.1 Containerized Development Environment
- Provide a `Dockerfile` or Dev Container configuration that mirrors your CI build environment.
- Example `.devcontainer/devcontainer.json`:
  ```json
  {
    "name": "MyApp Dev",
    "build": { "dockerfile": "Dockerfile" },
    "features": {
      "ghcr.io/devcontainers/features/common-utils:2": {}
    }
  }
  ```
- This ensures builds are reproducible and eliminates “works on my machine” discrepancies.

### 2.2 Pre‑commit Hooks for Security
- Use [pre-commit](https://pre-commit.com/) to run:
  - **Dependency hash verification** (e.g., check `go.sum` against a known good state).
  - **Linting and static analysis**.
  - **Secret scanning** (e.g., `detect-secrets` or `truffleHog`).
- Example `.pre-commit-config.yaml`:
  ```yaml
  repos:
    - repo: local
      hooks:
        - id: verify-deps
          name: Verify dependencies
          entry: scripts/verify-deps.sh
          language: script
          files: '.*\.(mod|sum|lock)$'
    - repo: https://github.com/pre-commit/pre-commit-hooks
      rev: v4.4.0
      hooks:
        - id: detect-aws-credentials
        - id: detect-private-key
  ```

### 2.3 Local Build with Provenance (Optional but Recommended)
- For testing, you can generate lightweight attestations using [in-toto](https://in-toto.io/).
- Example wrapper script `local-build.sh`:
  ```bash
  #!/bin/bash
  in-toto-run --step-name local-build --products myapp --key mykey -- ./build.sh
  ```
- This creates a link file that you can keep locally for debugging.

---

## 🔁 Phase 3: Continuous Integration (CI) Pipeline

### 3.1 Reusable Build Workflow
Create a reusable workflow (`.github/workflows/build.yml`) that encapsulates your build steps and outputs artifact hashes.

```yaml
name: Reusable Build

on:
  workflow_call:
    outputs:
      base64-subjects:
        description: "Base64-encoded subjects (artifacts with digests)"
        value: ${{ jobs.build.outputs.base64-subjects }}

jobs:
  build:
    runs-on: ubuntu-latest
    outputs:
      base64-subjects: ${{ steps.hashes.outputs.base64_subjects }}
    steps:
      - uses: actions/checkout@v4
      - run: make build
      - run: mkdir -p artifacts && cp bin/* artifacts/
      - id: hashes
        run: |
          cd artifacts
          subjects="[]"
          for file in *; do
            hash=$(sha256sum "$file" | cut -d' ' -f1)
            subjects=$(jq -c --arg name "$file" --arg hash "sha256:$hash" \
                      '. += [{"name": $name, "digest": $hash}]' <<< "$subjects")
          done
          echo "base64_subjects=$(echo -n "$subjects" | base64 -w0)" >> $GITHUB_OUTPUT
      - uses: actions/upload-artifact@v4
        with:
          name: build-artifacts-${{ github.run_id }}
          path: artifacts/
```

### 3.2 Main CI Workflow (PRs and Merges)
Create a main workflow (`.github/workflows/ci.yml`) that calls the reusable build and then verifies dependencies.

```yaml
name: CI

on:
  pull_request:
  push:
    branches: [main]

permissions:
  contents: read
  id-token: write   # Needed if you verify provenance of dependencies

jobs:
  build:
    uses: ./.github/workflows/build.yml

  verify-deps:
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Download dependency provenance
        run: |
          # Example: verify a third-party binary used in build
          curl -LO https://example.com/dependency.bin
          curl -LO https://example.com/dependency.intoto.jsonl
          slsa-verifier verify-artifact \
            --provenance-path dependency.intoto.jsonl \
            --source-uri github.com/trusted-owner/dependency \
            --builder-id trusted-builder-id \
            dependency.bin
```

### 3.3 Release Workflow with SLSA3 Provenance
Create a separate workflow (`.github/workflows/release.yml`) triggered on tags or release publication.

```yaml
name: Release

on:
  release:
    types: [published]

permissions:
  id-token: write
  attestations: write
  contents: write
  actions: read

jobs:
  build:
    uses: ./.github/workflows/build.yml

  provenance:
    needs: build
    uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
    with:
      base64-subjects: ${{ needs.build.outputs.base64-subjects }}
      upload-artifacts-name: build-artifacts-${{ github.run_id }}
      upload-assets: true

  verify-and-publish:
    needs: provenance
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v4
        with:
          name: build-artifacts-${{ github.run_id }}
          path: artifacts/

      - name: Verify provenance
        run: |
          gh attestation verify artifacts/myapp \
            --owner ${{ github.repository_owner }} \
            --signer-repo slsa-framework/slsa-github-generator

      - name: Upload to release
        run: |
          gh release upload ${{ github.event.release.tag_name }} artifacts/* provenance.json
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

---

## 🔐 Phase 4: Verification Gate Before Deployment

### 4.1 Deployment Job
In the release workflow (or a separate deployment workflow), add a final verification step:

```yaml
deploy:
  needs: verify-and-publish
  runs-on: ubuntu-latest
  environment: production
  steps:
    - name: Verify attestation again (defense in depth)
      run: |
        gh attestation verify artifacts/myapp \
          --owner ${{ github.repository_owner }}
    - name: Deploy
      run: ./deploy.sh artifacts/
```

### 4.2 Enforce Verification in Production Environment
- Configure GitHub Environments with **required reviewers**.
- Optionally, use a deployment protection rule that calls an external verification service (e.g., via a custom GitHub Action).

---

## 📘 Phase 5: Developer Onboarding & Documentation

Create a `CONTRIBUTING.md` or `DEVELOPMENT.md` that covers:
- How to set up the local environment (Docker, pre‑commit, signing keys).
- How to run a local build that mimics CI.
- How to interpret verification failures.
- Where to find provenance files and how to manually verify them.

Example section:

```markdown
## Verifying Artifacts Locally

After a CI build, you can download the provenance file from the workflow run and verify it:

```bash
gh attestation verify myapp --owner myorg
```

Or using the `slsa-verifier` tool:

```bash
slsa-verifier verify-artifact \
  --provenance-path provenance.json \
  --source-uri github.com/myorg/myapp \
  myapp
```
```

---

## 🧪 Phase 6: Testing the Pipeline

1. **Test a pull request**: Push a change, ensure the CI workflow runs, and that dependency verification passes.
2. **Create a pre‑release**: Tag a commit, push the tag, and trigger the release workflow. Download the artifacts and verify them manually.
3. **Simulate a tampering attempt**: Modify an artifact locally and try to verify it – the verification should fail.
4. **Rotate keys**: If using GPG for commit signing, practice rotating a developer key and updating the repository settings.

---

## 📈 Ongoing Maintenance

- Keep the SLSA generator version up to date (check for releases at [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator/releases)).
- Periodically review dependency verification rules.
- Update developer documentation as tooling evolves.

---

## 🎉 You’re Now SLSA3‑Ready

By following this guide, your development workflow will:
- Produce **non‑forgeable provenance** for every release.
- Ensure **source integrity** through signed commits.
- Provide **reproducible builds** via containerized environments.
- Build a **culture of security** where every developer understands and participates in supply chain protection.

This is a living process – adapt it to your team’s size, tech stack, and release cadence. And remember, the SLSA community is constantly improving tooling and practices; stay engaged to keep your pipeline cutting‑edge.

Would you like help with any specific part, such as setting up the containerized environment or writing the reusable workflow? I’m here to assist!
@Sazwanismail Sazwanismail added this to the Create CodeQL Advanced milestone Mar 16, 2026
@Sazwanismail Sazwanismail self-assigned this Mar 16, 2026
@Sazwanismail Sazwanismail added documentation Improvements or additions to documentation duplicate This issue or pull request already exists help wanted Extra attention is needed question Further information is requested wontfix This will not be worked on size:L This PR changes 100-499 lines, ignoring generated files labels Mar 16, 2026
@changeset-bot

changeset-bot Bot commented Mar 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ac86565

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codeant-ai

codeant-ai Bot commented Mar 16, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a comprehensive, step-by-step guide for establishing a SLSA Level 3 compliant development workflow. It covers practical recommendations from securing the repository and local development environment to implementing robust CI/CD pipelines with provenance generation and verification, ensuring every artifact has verifiable proof of its origin and integrity. The aim is to integrate security practices seamlessly into daily development, fostering a culture of supply chain protection.

Highlights

  • SLSA3 Goal and Overview: Outlined the primary goal of establishing a development pipeline where every artifact carries verifiable proof of its origin and integrity, satisfying SLSA Build Level 3.
  • Repository Foundation: Detailed steps for securing the repository, including enabling signed commits, configuring robust branch protection rules, and implementing dependency locking mechanisms.
  • Local Development Environment: Provided guidance on containerizing development environments for reproducibility, integrating pre-commit hooks for security (e.g., dependency hash verification, secret scanning), and optionally generating local build provenance.
  • Continuous Integration (CI) Pipeline: Described the creation of reusable build workflows, main CI workflows for pull requests and merges that verify dependencies, and release workflows specifically designed for SLSA3 provenance generation.
  • Deployment Verification Gate: Explained how to implement a critical verification gate before deployment, including a dedicated deployment job and enforcing verification in production environments for defense in depth.
  • Developer Onboarding and Documentation: Emphasized the importance of comprehensive documentation (e.g., CONTRIBUTING.md or DEVELOPMENT.md) for developer onboarding, covering setup, local builds, verification processes, and secure dependency handling.
  • Pipeline Testing and Maintenance: Suggested practical steps for thoroughly testing the SLSA3 pipeline, such as simulating tampering attempts and practicing key rotation, along with ongoing maintenance practices like keeping SLSA generators updated.
Changelog
  • Development
    • Completely rewrote the content to provide a detailed guide on building a SLSA3-compliant development workflow, replacing previous general contributing guidelines.
Activity
  • No human activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@google-cla

google-cla Bot commented Mar 16, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Sazwanismail
Sazwanismail merged commit c823cf1 into Sazwanismail-patch-3 Mar 16, 2026
4 of 17 checks passed
@codeant-ai codeant-ai Bot added size:L This PR changes 100-499 lines, ignoring generated files and removed size:L This PR changes 100-499 lines, ignoring generated files labels Mar 16, 2026
@codeant-ai

codeant-ai Bot commented Mar 16, 2026

Copy link
Copy Markdown

Sequence Diagram

This PR replaces a general contributing guide with a SLSA3 oriented development workflow. The new core flow emphasizes local dependency verification and reproducible builds, followed by CI provenance verification before merge and signed release.

sequenceDiagram
    participant Developer
    participant LocalEnv
    participant CI
    participant Verifier
    participant Release

    Developer->>LocalEnv: Pull signed commits and implement change
    Developer->>LocalEnv: Run pre commit dependency and security checks
    Developer->>LocalEnv: Build and test in reproducible container
    Developer->>CI: Push branch and open pull request
    CI->>Verifier: Verify dependency provenance and build provenance
    Verifier-->>CI: Verification passed
    CI-->>Developer: Provenance checks green
    Developer->>Release: Merge and publish signed artifact with provenance
Loading

Generated by CodeAnt AI

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the existing Development file, which served as a contribution guide, with a new document focused on implementing a SLSA3-compliant development workflow. While the new guide on SLSA3 is detailed and valuable, this change results in the complete removal of the previous contribution guidelines, which may be unintentional. My review includes suggestions to improve the new content's quality as a technical document, primarily by removing conversational language that seems to have been copied from a draft or interactive session. I recommend you consider whether the original contribution guide should be preserved, for example by integrating the new SLSA3 information into it or by placing the SLSA3 guide in a separate file.

Comment thread Development
Comment thread Development
Comment thread Development
@codeant-ai

codeant-ai Bot commented Mar 16, 2026

Copy link
Copy Markdown

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Key Usage Guidance
    The in-toto-run example uses --key mykey which might be interpreted as storing/using private keys insecurely. Clarify recommended secure key storage/use patterns (e.g., use of hardware keys, environment-protected key paths, or Sigstore + ephemeral keys).

  • Hardcoded Example
    The slsa-verifier example hardcodes a long --builder-id URL with a specific tag. Hardcoded external URIs/tags can become stale and reduce portability; consider using a placeholder or env var and document pinning strategy.

  • Formatting / Flow
    A sentence is concatenated without a space/newline, creating a readability bug and duplicating content ("Great!" appears twice). This should be split or deduplicated for clearer flow.

Comment thread Development
@codeant-ai

codeant-ai Bot commented Mar 16, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation duplicate This issue or pull request already exists help wanted Extra attention is needed question Further information is requested size:L This PR changes 100-499 lines, ignoring generated files wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant