Skip to content

Commit 65c343a

Browse files
committed
include provenance and additional docs
1 parent 88598bd commit 65c343a

5 files changed

Lines changed: 64 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Run CI
22
on:
33
push:
4-
branches: [ main ]
4+
branches: [ main, 'feat/**' ]
55
paths-ignore:
66
- '**.md' # Do not need to run CI for markdown changes.
77
pull_request:
8-
branches: [ main ]
8+
branches: [ main, 'feat/**' ]
99
paths-ignore:
1010
- '**.md'
1111

.github/workflows/publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,3 @@ jobs:
6868
base64-subjects: "${{ needs.build-publish.outputs.gem-hash }}"
6969
upload-assets: ${{ !inputs.dry_run }}
7070
upload-tag-name: ${{ needs.release-package.outputs.upload-tag-name }}
71-
provenance-name: ${{ format('{0}_provenance.intoto.jsonl', inputs.tag_name) }}

PROVENANCE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## Verifying SDK build provenance with the SLSA framework
2+
3+
LaunchDarkly uses the [SLSA framework](https://slsa.dev/spec/v1.0/about) (Supply-chain Levels for Software Artifacts) to help developers make their supply chain more secure by ensuring the authenticity and build integrity of our published SDK packages.
4+
5+
As part of [SLSA requirements for level 3 compliance](https://slsa.dev/spec/v1.0/requirements), LaunchDarkly publishes provenance about our SDK package builds using [GitHub's generic SLSA3 provenance generator](https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/generic/README.md#generation-of-slsa3-provenance-for-arbitrary-projects) for distribution alongside our packages. These attestations are available for download from the GitHub release page for the release version under Assets > `multiple-provenance.intoto.jsonl`.
6+
7+
To verify SLSA provenance attestations, we recommend using [slsa-verifier](https://github.com/slsa-framework/slsa-verifier). Example usage for verifying SDK packages is included below:
8+
9+
<!-- x-release-please-start-version -->
10+
```
11+
# Set the version of the SDK to verify
12+
VERSION=0.0.0
13+
```
14+
<!-- x-release-please-end -->
15+
16+
```
17+
# Download gem
18+
$ gem fetch launchdarkly-server-sdk-ai -v $VERSION
19+
20+
# Download provenance from Github release
21+
$ curl --location -O \
22+
https://github.com/launchdarkly/ruby-server-sdk-ai/releases/download/${VERSION}/launchdarkly-server-sdk-ai-${VERSION}.gem.intoto.jsonl
23+
24+
# Run slsa-verifier to verify provenance against package artifacts
25+
$ slsa-verifier verify-artifact \
26+
--provenance-path launchdarkly-server-sdk-ai-${VERSION}.gem.intoto.jsonl \
27+
--source-uri github.com/launchdarkly/ruby-server-sdk-ai \
28+
launchdarkly-server-sdk-ai-${VERSION}.gem
29+
```
30+
31+
Below is a sample of expected output.
32+
TODO: Verify these are accurate
33+
```
34+
Verified signature against tlog entry index 83653185 at URL: https://rekor.sigstore.dev/api/v1/log/entries/24296fb24b8ad77a7df0bbf87a7d5fcaafa551a2101d9f993d251a56a918bb113e81d2c575dc7e25
35+
Verified build using builder "https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@refs/tags/v1.10.0" at commit 14c48a68c45871c27409591969e7f4c0ebdcdf62
36+
Verifying artifact launchdarkly-server-sdk-ai-1.0.0.gem: PASSED
37+
38+
PASSED: Verified SLSA provenance
39+
```
40+
41+
Alternatively, to verify the provenance manually, the SLSA framework specifies [recommendations for verifying build artifacts](https://slsa.dev/spec/v1.0/verifying-artifacts) in their documentation.
42+
43+
**Note:** These instructions do not apply when building our libraries from source.

Rakefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# frozen_string_literal: true
2+
3+
require "bundler/gem_tasks"
4+
require "rspec/core/rake_task"
5+
6+
RSpec::Core::RakeTask.new(:spec)
7+
8+
require "rubocop/rake_task"
9+
10+
RuboCop::RakeTask.new
11+
12+
task default: %i[spec rubocop]

docs/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# LaunchDarkly Server-side AI library for Ruby
2+
3+
This generated API documentation lists all types and methods in the SDK.
4+
5+
The API documentation for the most recent release is hosted on [GitHub Pages](https://launchdarkly.github.io/ruby-server-sdk-ai). API documentation for current and past releases is hosted on [RubyDoc.info](https://www.rubydoc.info/gems/launchdarkly-server-sdk-ai).
6+
7+
Source code and readme: [GitHub](https://github.com/launchdarkly/ruby-server-sdk-ai)

0 commit comments

Comments
 (0)