Giter Site home page Giter Site logo

gha-reusable-workflows's Introduction

GitHub Reusable Workflows

This repository have reusable workflows for building a SLSA level 3 secure software supply chain.

The following figure illustrates SLSA Supply chain threats:

SLSA Supply chain threats

See example application pository for an example use of the workflows from this repositoty.

Protections

Mitigation of threats as described by SLSA are described below.

Legend

  • ๐Ÿ“ Attestation or other metadata produced/used by workflows.
  • โ›” Control/governance point, i.e. decision point for accepting artifacts.
  • ๐ŸŽฉ Trusted process through separation of duties.
  • โŒ No mitigation

Mitigation mechanisms for threat-points from figure above:

  • A. Submit unauthorized source:
    • ๐Ÿ“ PR provenance attestation showing PR status, who reviewed, approved and merged etc.
    • TODO: Investigate Gittuf
  • B. Compromised source repository:
    • โŒ None
    • TODO: Produce Git signature attestation
  • C. Build from modified source
    • โŒ None
    • TODO: Produce Git signature attestation
  • D. Compromised dependencies
    • ๐Ÿ“ SBOM attestation
    • ๐Ÿ“ Container CVE scan attestation
  • E. Compromised build process
  • F. Upload modified artifacts
    • ๐Ÿ“ Container digest used throughout workflows
    • ๐Ÿ“ Container signed
  • G. Compromised artifact storage
    • ๐Ÿ“ Container digest used throughout workflows
    • ๐Ÿ“ Container signed
  • H. Deploy compromised artifact

Note, that SLSA levels describe the build-phase and does not cover the source-phase, i.e. tampering with the source prior to building.

Pull-request Attestation

The policy-verification workflow applies Rego-based organisation policies to the attestions produced by prior workflows using artifact-underwriter. Based on the policy verification result, a Verification Summary Attestation (VSA) is issued.

The attestations produced by the workflows are generally standardised, except for the pull-request attestation since no standard exists. The produced pull-request attestation are summarised below.

{
  "_type": "https://in-toto.io/Statement/v0.1",
  "predicateType": "https://github.com/michaelvl/gha-reusable-workflows/pr-provenance",
  "subject": [
     ...
  ],
  "predicate": {
    "pull_requests": {
      "associatedPullRequests": {
        "nodes": [
          {
            "author": {
              ...           # Who created the PR
            },
            "approvers": {
              ...           # Who approved the PR
            },
            "assignees": {
              ...           # PR review assignees
            },
            "body": ...,    # Body text of PR
            "mergedAt": ...
            "mergedBy": ...   # Who merged the PR
            "reviewDecision": # Overall review state
            "state": "MERGED",
            "title": ...
          }
        ]
      },
    },
    "repository": {         # Git references
      "digest": {
        "sha1": ...
      },
      "name": ...
      "ref": ...
       ...
    }
  }
}

Links

gha-reusable-workflows's People

Contributors

michaelvl avatar dependabot[bot] avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.