GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — powertools-lambda-python/docs/security.md at develop · rpivo/powertools-lambda-python

Expand file tree

/

security.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
88 lines (56 loc) · 4.13 KB
/

security.md

Copy path

File metadata and controls

88 lines (56 loc) · 4.13 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions
title Security
description Security practices and processes for Powertools for AWS Lambda (Python)

Overview

Open Source Security Foundation Best Practices

This page describes our security processes and supply chain practices.

!!! info "We continuously check and evolve our practices, therefore it is possible some diagrams may be eventually consistent."

--8<-- "SECURITY.md"

Supply chain

Verifying signed builds

!!! note "Starting from v2.20.0 releases, builds are reproducible{target="_blank" rel="nofollow"} and signed publicly."

![SLSA Supply Chain Threats](https://slsa.dev/images/v1.0/supply-chain-threats.svg)

Supply Chain Threats visualized by SLSA

Terminology

We use SLSA{target="_blank" rel="nofollow"} to ensure our builds are reproducible and to adhere to supply chain security practices.

Within our releases page, you will notice a new metadata file: multiple.intoto.jsonl. It's metadata to describe where, when, and how our build artifacts were produced - or simply, attestation in SLSA terminology.

For this to be useful, we need a verification tool - SLSA Verifier. SLSA Verifier decodes attestation to confirm the authenticity, identity, and the steps we took in our release pipeline (e.g., inputs, git commit/branch, GitHub org/repo, build SHA256, etc.).

HOWTO

You can do this manually or automated via a shell script. We maintain the latter to ease adoption in CI systems (feel free to modify to your needs).

=== "Manually"

* Download [SLSA Verifier binary](https://github.com/slsa-framework/slsa-verifier#download-the-binary)
* Download the [latest release artifact from PyPi](https://pypi.org/project/aws-lambda-powertools/#files) (either wheel or tar.gz )
* Download `multiple.intoto.jsonl` attestation from the [latest release](https://github.com/aws-powertools/powertools-lambda-python/releases/latest) under _Assets_

!!! note "Next steps assume macOS as the operating system, and release v2.20.0"

You should have the following files in the current directory:

* **SLSA Verifier tool**: `slsa-verifier-darwin-arm64`
* **Powertools Release artifact**: `aws_lambda_powertools-2.20.0-py3-none-any.whl`
* **Powertools attestation**: `multiple.intoto.jsonl`

You can now run SLSA Verifier with the following options:

```bash
./slsa-verifier-darwin-arm64 verify-artifact \
    --provenance-path "multiple.intoto.jsonl" \
    --source-uri github.com/aws-powertools/powertools-lambda-python \
    aws_lambda_powertools-2.20.0-py3-none-any.whl
```

=== "Automated"

```shell title="Verifying a release with verify_provenance.sh script"
bash verify_provenance.sh 2.20.0
```

!!! question "Wait, what does this script do?"

I'm glad you asked! It takes the following actions:

1. **Downloads SLSA Verifier** using the pinned version (_e.g., 2.3.0)
2. **Verifies the integrity** of our newly downloaded SLSA Verifier tool
3. **Downloads attestation** file for the given release version
4. **Downloads `aws-lambda-powertools`** release artifact from PyPi for the given release version
5. **Runs SLSA Verifier against attestation**, GitHub Source, and release binary
6. **Cleanup** by removing downloaded files to keep your current directory tidy

??? info "Expand or [click here](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/.github/actions/verify-provenance/verify_provenance.sh){target="_blank"} to see the script source code"

      ```bash title=".github/actions/verify-provenance/verify_provenance.sh"
      ---8<-- ".github/actions/verify-provenance/verify_provenance.sh"
      ```
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.