All Projects → philips-labs → slsa-provenance-action

philips-labs / slsa-provenance-action

Licence: MIT license
Github Action implementation of SLSA Provenance Generation

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to slsa-provenance-action

recent-activity
Add your recent activity to your profile readme!
Stars: ✭ 87 (+155.88%)
Mutual labels:  github-actions, github-action
Github Pages Deploy Action
Automatically deploy your project to GitHub Pages using GitHub Actions. This action can be configured to push your production-ready code into any branch you'd like.
Stars: ✭ 2,507 (+7273.53%)
Mutual labels:  github-actions, github-action
intellij-platform-plugin-verifier-action
GitHub Action for executing the intellij-plugin-verifier
Stars: ✭ 20 (-41.18%)
Mutual labels:  github-actions, github-action
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+229.41%)
Mutual labels:  github-actions, github-action
setup-bats
GitHub Action to setup BATS testing framework
Stars: ✭ 25 (-26.47%)
Mutual labels:  github-actions, github-action
latex-action
GitHub Action to compile LaTeX documents
Stars: ✭ 123 (+261.76%)
Mutual labels:  github-actions, github-action
github-run-tests-action
mabl Github Actions implementation
Stars: ✭ 39 (+14.71%)
Mutual labels:  github-actions, github-action
gajira
GitHub Actions for Jira
Stars: ✭ 100 (+194.12%)
Mutual labels:  github-actions, github-action
sentry-releases-action
A GitHub action that creates releases for Sentry.io.
Stars: ✭ 38 (+11.76%)
Mutual labels:  github-actions, github-action
action-setup-kube-tools
Github Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeconform, conftest, yq, rancher, tilt, skaffold) very fast and cache them on the runner. Please [✩Star] if you're using it!
Stars: ✭ 45 (+32.35%)
Mutual labels:  github-actions, github-action
autoupdate
A GitHub Action that auto-updates pull requests branches, whenever changes are pushed to their destination branch.
Stars: ✭ 70 (+105.88%)
Mutual labels:  github-actions, github-action
restrict-cursing-action
Github Action to prevent cursing and bad language in issues and pull requests
Stars: ✭ 20 (-41.18%)
Mutual labels:  github-actions, github-action
Setup-Nuget
Set up your GitHub Actions workflow with the latest version of Nuget.exe CLI tool
Stars: ✭ 27 (-20.59%)
Mutual labels:  github-actions, github-action
action-sync-node-meta
GitHub Action that syncs package.json with the repository metadata.
Stars: ✭ 25 (-26.47%)
Mutual labels:  github-actions, github-action
git-actions
A GitHub Action to run arbitrary git commands
Stars: ✭ 72 (+111.76%)
Mutual labels:  github-actions, github-action
build-godot-action
GitHub action that builds a Godot project for multiple platforms
Stars: ✭ 62 (+82.35%)
Mutual labels:  github-actions, github-action
misspell-fixer-action
📝Automatically fixes typos and mistakes in your source code and docs!
Stars: ✭ 123 (+261.76%)
Mutual labels:  github-actions, github-action
overview
Automate your workflows with GitHub actions for MATLAB.
Stars: ✭ 40 (+17.65%)
Mutual labels:  github-actions, github-action
in-toto-golang
A Go implementation of in-toto. in-toto is a framework to protect software supply chain integrity.
Stars: ✭ 48 (+41.18%)
Mutual labels:  software-supply-chain, in-toto
clang-format-action
GitHub Action for clang-format checking
Stars: ✭ 48 (+41.18%)
Mutual labels:  github-actions, github-action

Contributors Forks Stargazers Issues MIT License


Logo

SLSA Provenance GitHub Action

Github Action to generate [SLSA provenance][slsa-provenance]
Report Bug · Request Feature

About This Project

This GitHub action implements the level 1 requirements of the SLSA framework. By using this GitHub Action it is possible to easily generate the provenance file for different artifact types. Different artifact types include, but not limited to:

  • Files
  • Push event (Docker Hub, trigger different workflow, etc)

While there are no integrity guarantees on the produced provenance at L1, publishing artifact provenance in a common format opens up opportunities for automated analysis and auditing. Additionally, moving build definitions into source control and onto well-supported, secure build systems represents a marked improvement from the ecosystem's current state.

This is not an official GitHub Action set up and maintained by the SLSA team. This GitHub Action is built for research purposes by Philips Research. It is heavily inspired by the original Provenance Action example built by SLSA.

(back to top)

Background

SLSA is a framework intended to codify and promote secure software supply-chain practices. SLSA helps trace software artifacts (e.g. binaries) back to the build and source control systems that produced them using in-toto's Attestation metadata format.

Built With

(back to top)

Getting Started

Get started quickly by reading the information below.

Prerequisites

Ensure you have the following installed:

  • Golang
  • Docker

Recommendations

The following IDE is recommended when working on this codebase:

Local Installation

  1. Clone the repo.

    git clone [email protected]:philips-labs/slsa-provenance-action.git
  2. Build the binary.

    make build
  3. Execute the binary.

    ./bin/slsa-provenance help

Docker Image

Our Docker images are available at both GitHub Container Registry (ghcr) and Docker Hub.

Docker Hub See all available images here. Run the Docker image by doing:

docker run philipssoftware/slsa-provenance:v0.7.2

GitHub Container Registry See all available images here. Run the Docker image by doing:

docker run ghcr.io/philips-labs/slsa-provenance:v0.7.2

The Docker image includes the working binary that can be executed by using the slsa-provenance command.

(back to top)

Usage

The easiest way to use this action is to add the following into your workflow file. Additional configuration might be necessary to fit your usecase.

GitHub Releases

Add the following part in your workflow file:

See ci workflow for a full example using GitHub releases.

⚠️ NOTE: this job depends on a release job that publishes the release assets to a GitHub Release.

provenance:
  name: provenance
  needs: [release]
  runs-on: ubuntu-20.04

  steps:
    - name: Generate provenance for Release
      uses: philips-labs/[email protected]
      with:
        command: generate
        subcommand: files
        arguments: --artifact-path release-assets --output-path 'provenance.json' --tag-name ${{ github.ref_name }}
      env:
        GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GitHub artifacts

Add the following part in your workflow file:

See example workflow for a full example using GitHub artifacts.

generate-provenance:
  name: Generate build provenance
  runs-on: ubuntu-latest
  steps:
    - name: Download build artifact
      uses: actions/download-artifact@v2
      with:
        path: artifact/

    - name: Download extra materials for provenance
      uses: actions/download-artifact@v2
      with:
        name: extra-materials
        path: extra-materials/

    - name: Generate provenance
      uses: philips-labs/[email protected]
      with:
        command: generate
        subcommand: files
        arguments: --artifact-path artifact/ --extra-materials extra-materials/file1.json,extra-materials/some-more.json

    - name: Upload provenance
      uses: actions/upload-artifact@v2
      with:
        path: provenance.json

Description

An action to generate SLSA build provenance for an artifact

Inputs

parameter description required default
command The slsa-provenance command to run false generate
subcommand The subcommand to use when generating provenance false files
github_context internal (do not set): the "github" context object in json true ${{ toJSON(github) }}
runner_context internal (do not set): the "runner" context object in json true ${{ toJSON(runner) }}
arguments the arguments for the given command and subcommand true

(back to top)

Contributing

If you have a suggestion that would make this project better, please fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please refer to the Contributing Guidelines for all the guidelines.

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Powered by Philips SWAT Eindhoven

(back to top)

Acknowledgments

This project is inspired by:

(back to top)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].