-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
README and docs restructure #362
Merged
ChaosInTheCRD
merged 61 commits into
in-toto:main
from
ChaosInTheCRD:readme-docs-restructure
Jan 25, 2024
Merged
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
41335ef
starting proposed restructure
ChaosInTheCRD 43375bd
adding latest changes to README
ChaosInTheCRD 0a0280f
fixed link to contributing md
ChaosInTheCRD 03fada4
made title title heading size
ChaosInTheCRD 96ab9df
named the file wrong - doh
ChaosInTheCRD 68c38e1
resizing headings at top
ChaosInTheCRD ab1628f
added spacing
ChaosInTheCRD 142a017
a few more fixes
ChaosInTheCRD 03cd875
adding background section
ChaosInTheCRD a5c2cec
removing bullet
ChaosInTheCRD d70b8a0
final neatening
ChaosInTheCRD 545e3b0
updated docs further - tutorial not working
ChaosInTheCRD 0c0618d
adding demo gif
ChaosInTheCRD bbee6c2
adding docusaurus stuff and more progress
ChaosInTheCRD 7603bf2
saving progress, including docusaurus website
ChaosInTheCRD c643b9d
changing logo
ChaosInTheCRD 1922341
adding snowfall
ChaosInTheCRD a335e30
adding the concepts section
ChaosInTheCRD 1ca4e7f
Adding the contributing.md from archivista (#327)
ChaosInTheCRD 5fc24e7
Migrating go module (#328)
ChaosInTheCRD b2c373d
Migrating to the use of in-toto/go-witness module (#331)
ChaosInTheCRD f900d61
Bumping Go version for goreleaser (#333)
ChaosInTheCRD 5506a27
chore: bump actions/download-artifact from 3.0.2 to 4.0.0 (#335)
dependabot[bot] b7c9ba5
chore: bump github/codeql-action from 2.22.9 to 3.22.11 (#336)
dependabot[bot] 31591ec
chore: bump actions/upload-artifact from 3.1.3 to 4.0.0 (#337)
dependabot[bot] 4f669ed
chore: bump github/codeql-action from 3.22.11 to 3.22.12 (#343)
dependabot[bot] 25f7c82
chore: bump actions/download-artifact from 4.0.0 to 4.1.0 (#342)
dependabot[bot] ffecc71
moving config doc
ChaosInTheCRD 604c3cb
adding latest changes
ChaosInTheCRD fc067bc
saving progress
ChaosInTheCRD 3cbcb83
adding keyless signing tutorial
ChaosInTheCRD d73b2c0
doing images
ChaosInTheCRD f823fef
fixing broken image
ChaosInTheCRD 5ed9700
changing url
ChaosInTheCRD 1603131
fixed images
ChaosInTheCRD af4cc5b
updating docs and removing witness.md
ChaosInTheCRD 4711a0e
Update go-git to resolve vulnerability (#346)
jkjell f934774
chore: bump actions/dependency-review-action from 3.1.4 to 3.1.5 (#349)
dependabot[bot] 806bdda
Add FOSSA license scanning
jkjell b7d2e92
Add Security MD files an add FOSSA scan badge
ChaosInTheCRD d67015c
Pin dependencies and restrict permissions
jkjell 9983e7f
Add signing to goreleaser and Best Practices badge to readme.
ChaosInTheCRD 1942218
Add cosign install
jkjell 7d0ae70
Update cloudflare/circl due to dependabot failure (#352)
jkjell 5ee544d
updated package json
ChaosInTheCRD c3af51d
chore: bump actions/cache from 3.3.2 to 3.3.3 (#355)
dependabot[bot] 87ff0e1
chore: bump actions/upload-artifact from 4.0.0 to 4.1.0 (#356)
dependabot[bot] 249e5aa
chore: bump github/codeql-action from 3.22.12 to 3.23.0 (#357)
dependabot[bot] 647b6dd
chore: bump actions/download-artifact from 4.1.0 to 4.1.1 (#358)
dependabot[bot] 604b6b4
Initial attempt at PR and Issue templates (#351)
jkjell 8c7b796
Checking attestors for duplicates (#361)
ChaosInTheCRD b15e4e6
removing witness website for now
ChaosInTheCRD 8478623
Merge branch 'main' of github.com:in-toto/witness into readme-docs-re…
ChaosInTheCRD c51520f
editing image links
ChaosInTheCRD ee81560
updating docgen
ChaosInTheCRD 07490b1
fixing docgen
ChaosInTheCRD 3988348
addressing comments
ChaosInTheCRD 84069e8
Merge branch 'main' into readme-docs-restructure
ChaosInTheCRD 1f4e9d1
fixing small issue with md
ChaosInTheCRD c4dede3
Merge branch 'readme-docs-restructure' of github.com:ChaosInTheCRD/wi…
ChaosInTheCRD c8b4137
fixed ellipsis
ChaosInTheCRD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# How Witness Works | ||
|
||
### Signing | ||
Witness is able to observe your software development life-cycle (SDLC) by wrapping around commands executed within them. By passing any command to Witness as an argument, the tool is able to understand what was executed but also on what infrastructure, by what user or service account and more. The information that Witness gathers while the command is running is down to which [Attestors](docs/attestor.md) are used. Attestors are implementations of an interface that find and assert facts about the system Witness is running on (e.g., [AWS Attestor](docs/attestors/aws-iid.md)). Finally, Witness can compile this information into an [in-toto attestation](https://github.com/in-toto/attestation), place it in a [DSSE Envelope](https://github.com/secure-systems-lab/dsse) and sign that envelope with the key that was supplied by the user. | ||
|
||
### Storing | ||
For storage, the Witness project can upload signed attestations to an [Archivista](https://github.com/in-toto/archivista) server, a graph and storage service for in-toto attestations. This enables the discovery and retrieval of attestations for verification of software artifacts. | ||
|
||
### Verifying | ||
Witness allows users to verify the attestations that they generate by providing the `witness verify` command. To achieve this, Witness uses a [policy file](./docs/policy.md) defined by the user to check for presence of the expected attestations and that they were signed by the appropriate functionaries (Public keys or roots of trust that are trusted to sign certain types of attestation). To verify the attestation body itself, Witness supports defining [OPA Rego](https://www.openpolicyagent.org/docs/latest/policy-language/) policies inside the policy file. This allows users to ensure the facts asserted by the Attestors are reported expected. | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
# Witness CLI Reference | ||
|
||
This is the reference for the Witness command line tool, generated by [Cobra](https://cobra.dev/). | ||
|
||
## witness run | ||
|
||
Runs the provided command and records attestations about the execution | ||
|
||
``` | ||
witness run [cmd] [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
--archivista-server string URL of the Archivista server to store or retrieve attestations (default "https://archivista.testifysec.io") | ||
-a, --attestations strings Attestations to record ('product' and 'material' are always recorded) (default [environment,git]) | ||
--attestor-product-exclude-glob string Pattern to use when recording products. Files that match this pattern will be excluded as subjects on the attestation. | ||
--attestor-product-include-glob string Pattern to use when recording products. Files that match this pattern will be included as subjects on the attestation. (default "*") | ||
--enable-archivista Use Archivista to store or retrieve attestations | ||
--hashes strings Hashes selected for digest calculation. Defaults to SHA256 (default [sha256]) | ||
-h, --help help for run | ||
-o, --outfile string File to which to write signed data. Defaults to stdout | ||
--signer-file-cert-path string Path to the file containing the certificate for the private key | ||
--signer-file-intermediate-paths strings Paths to files containing intermediates required to establish trust of the signer's certificate to a root | ||
-k, --signer-file-key-path string Path to the file containing the private key | ||
--signer-fulcio-oidc-client-id string OIDC client ID to use for authentication | ||
--signer-fulcio-oidc-issuer string OIDC issuer to use for authentication | ||
--signer-fulcio-oidc-redirect-url string OIDC redirect URL (Optional). The default oidc-redirect-url is 'http://localhost:0/auth/callback'. | ||
--signer-fulcio-token string Raw token string to use for authentication to fulcio (cannot be used in conjunction with --fulcio-token-path) | ||
--signer-fulcio-token-path string Path to the file containing a raw token to use for authentication to fulcio (cannot be used in conjunction with --fulcio-token) | ||
--signer-fulcio-url string Fulcio address to sign with | ||
--signer-spiffe-socket-path string Path to the SPIFFE Workload API Socket | ||
--signer-vault-altnames strings Alt names to use for the generated certificate. All alt names must be allowed by the vault role policy | ||
--signer-vault-commonname string Common name to use for the generated certificate. Must be allowed by the vault role policy | ||
--signer-vault-namespace string Vault namespace to use | ||
--signer-vault-pki-secrets-engine-path string Path to the Vault PKI Secrets Engine to use (default "pki") | ||
--signer-vault-role string Name of the Vault role to generate the certificate for | ||
--signer-vault-token string Token to use to connect to Vault | ||
--signer-vault-ttl duration Time to live for the generated certificate. Defaults to the vault role policy's configured TTL if not provided | ||
--signer-vault-url string Base url of the Vault instance to connect to | ||
-s, --step string Name of the step being run | ||
--timestamp-servers strings Timestamp Authority Servers to use when signing envelope | ||
--trace Enable tracing for the command | ||
-d, --workingdir string Directory from which commands will run | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-c, --config string Path to the witness config file (default ".witness.yaml") | ||
-l, --log-level string Level of logging to output (debug, info, warn, error) (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [witness](witness.md) - Collect and verify attestations about your build environments | ||
|
||
## witness sign | ||
|
||
Signs a file | ||
|
||
### Synopsis | ||
|
||
Signs a file with the provided key source and outputs the signed file to the specified destination | ||
|
||
``` | ||
witness sign [file] [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-t, --datatype string The URI reference to the type of data being signed. Defaults to the Witness policy type (default "https://witness.testifysec.com/policy/v0.1") | ||
-h, --help help for sign | ||
-f, --infile string Witness policy file to sign | ||
-o, --outfile string File to write signed data. Defaults to stdout | ||
--signer-file-cert-path string Path to the file containing the certificate for the private key | ||
--signer-file-intermediate-paths strings Paths to files containing intermediates required to establish trust of the signer's certificate to a root | ||
-k, --signer-file-key-path string Path to the file containing the private key | ||
--signer-fulcio-oidc-client-id string OIDC client ID to use for authentication | ||
--signer-fulcio-oidc-issuer string OIDC issuer to use for authentication | ||
--signer-fulcio-oidc-redirect-url string OIDC redirect URL (Optional). The default oidc-redirect-url is 'http://localhost:0/auth/callback'. | ||
--signer-fulcio-token string Raw token string to use for authentication to fulcio (cannot be used in conjunction with --fulcio-token-path) | ||
--signer-fulcio-token-path string Path to the file containing a raw token to use for authentication to fulcio (cannot be used in conjunction with --fulcio-token) | ||
--signer-fulcio-url string Fulcio address to sign with | ||
--signer-spiffe-socket-path string Path to the SPIFFE Workload API Socket | ||
--signer-vault-altnames strings Alt names to use for the generated certificate. All alt names must be allowed by the vault role policy | ||
--signer-vault-commonname string Common name to use for the generated certificate. Must be allowed by the vault role policy | ||
--signer-vault-namespace string Vault namespace to use | ||
--signer-vault-pki-secrets-engine-path string Path to the Vault PKI Secrets Engine to use (default "pki") | ||
--signer-vault-role string Name of the Vault role to generate the certificate for | ||
--signer-vault-token string Token to use to connect to Vault | ||
--signer-vault-ttl duration Time to live for the generated certificate. Defaults to the vault role policy's configured TTL if not provided | ||
--signer-vault-url string Base url of the Vault instance to connect to | ||
--timestamp-servers strings Timestamp Authority Servers to use when signing envelope | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-c, --config string Path to the witness config file (default ".witness.yaml") | ||
-l, --log-level string Level of logging to output (debug, info, warn, error) (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [witness](witness.md) - Collect and verify attestations about your build environments | ||
|
||
## witness verify | ||
|
||
Verifies a witness policy | ||
|
||
### Synopsis | ||
|
||
Verifies a policy provided key source and exits with code 0 if verification succeeds | ||
|
||
``` | ||
witness verify [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
--archivista-server string URL of the Archivista server to store or retrieve attestations (default "https://archivista.testifysec.io") | ||
-f, --artifactfile string Path to the artifact to verify | ||
-a, --attestations strings Attestation files to test against the policy | ||
--enable-archivista Use Archivista to store or retrieve attestations | ||
-h, --help help for verify | ||
-p, --policy string Path to the policy to verify | ||
--policy-ca strings Paths to CA certificates to use for verifying the policy | ||
-k, --publickey string Path to the policy signer's public key | ||
-s, --subjects strings Additional subjects to lookup attestations | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-c, --config string Path to the witness config file (default ".witness.yaml") | ||
-l, --log-level string Level of logging to output (debug, info, warn, error) (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [witness](witness.md) - Collect and verify attestations about your build environments | ||
|
||
## witness version | ||
|
||
Prints out the witness version | ||
|
||
### Synopsis | ||
|
||
Prints out the witness version | ||
|
||
``` | ||
witness version [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for version | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-c, --config string Path to the witness config file (default ".witness.yaml") | ||
-l, --log-level string Level of logging to output (debug, info, warn, error) (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [witness](witness.md) - Collect and verify attestations about your build environments | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Attestors | ||
|
||
A Witness attestor is a programming interface that defines an object that can assert facts about a system and store those facts in a versioned schema. An attestor has a `Name`, `Type` and `RunType`. The `Type` is a versioned string corresponding to the JSON schema of the attestation. For example, the AWS attestor is defined as follows: | ||
``` | ||
Name = "aws" | ||
Type = "https://witness.dev/attestations/aws/v0.1" | ||
RunType = attestation.PreRunType | ||
``` | ||
Attestation types are leveraged to ensure the correct version schema is used when we evaluate policy against these attestations. | ||
|
||
## Attestor Security Model | ||
|
||
Attestations are only as secure as the data that feeds them. Where possible cryptographic material should be validated, evidence of validation should be included in the attestation for out-of-band validation. | ||
|
||
Examples of cryptographic validation is found in the [GCP](https://github.com/testifysec/witness/tree/main/pkg/attestation/gcp-iit), [AWS](https://github.com/testifysec/witness/blob/main/pkg/attestation/aws-iid/aws-iid.go), and [GitLab](https://github.com/testifysec/witness/tree/main/pkg/attestation/gitlab) attestors. | ||
|
||
## Attestor Life Cycle | ||
|
||
- **Pre-material:** Pre-material attestors run before any other attestors. These attestors generally collect information about the environment. | ||
|
||
- **Material:** Material attestors run after any prematerial attestors and prior to any execute attestors. Generally these collect information about state that may change after any execute attestors, such as file hashes. | ||
|
||
- **Execute:**: Execute attestors run after any material attestors and generally record information about some command or process that is to be executed. | ||
|
||
- **Product:** Product attestors run after any execute attestors and generally record information about what changed during the execute lifecycle step, such as changed or created files. | ||
|
||
- **Post-product:** Post-product attestors run after product attestors and generally record some additional information about specific products, such as OCI image information from a saved image tarball. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does having separate files make rendering on the new docs website easier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So again docs website related. I actually felt it was neater to present all the commands on a single page. This is something we can discuss / consider further though 😄 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Ship it for now, and we can revisit based on feedback after the new site is up.