Skip to content

Instantly share code, notes, and snippets.

@znewman01
Last active January 23, 2023 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save znewman01/1cdea8669a69f05c7292ab6c8ac6a283 to your computer and use it in GitHub Desktop.
Save znewman01/1cdea8669a69f05c7292ab6c8ac6a283 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
tmpdir=$(mktemp -d)
for f in $(find doc/ -name '*verify*'); do
grep -o -- '--[a-z0-9-]*' $f | sort -u | tr -d ' \t ' > $tmpdir/$(basename $f).flags
done
total=$(ls $tmpdir | wc -l)
echo "COMMON:"
find $tmpdir -type f | xargs sort | uniq -c | grep "$total --" | awk '{print $2}' > $tmpdir/common.flags
cat $tmpdir/common.flags
for f in $(find $tmpdir -name '*.md.flags'); do
echo
echo "$(basename $f):"
comm -13 $tmpdir/common.flags $f
done
echo
echo "COUNTS:"
find $tmpdir -name '*.md.flags' | xargs sort | uniq -c | sort -n
COMMON:
--certificate
--certificate-chain
--certificate-github-workflow-name
--certificate-github-workflow-ref
--certificate-github-workflow-repository
--certificate-github-workflow-sha
--certificate-github-workflow-trigger
--certificate-identity
--certificate-identity-regexp
--certificate-oidc-issuer
--certificate-oidc-issuer-regexp
--help
--insecure-ignore-sct
--insecure-ignore-tlog
--key
--offline
--output-file
--rekor-url
--sct
--sk
--slot
--timeout
--timestamp-certificate-chain
--verbose
cosign_verify.md.flags:
--allow-http-registry
--allow-insecure-registry
--annotations
--attachment
--attachment-tag-prefix
--cert
--cert-chain
--check-claims
--k8s-keychain
--local-image
--output
--signature
--signature-digest-algorithm
cosign_dockerfile_verify.md.flags:
--allow-http-registry
--allow-insecure-registry
--annotations
--attachment
--attachment-tag-prefix
--base-image-only
--check-claims
--k8s-keychain
--local-image
--output
--signature
--signature-digest-algorithm
cosign_verify-attestation.md.flags:
--allow-http-registry
--allow-insecure-registry
--attachment-tag-prefix
--check-claims
--k8s-keychain
--local-image
--output
--policy
--type
cosign_manifest_verify.md.flags:
--allow-http-registry
--allow-insecure-registry
--annotations
--attachment
--attachment-tag-prefix
--check-claims
--k8s-keychain
--local-image
--output
--signature
--signature-digest-algorithm
cosign_verify-blob-attestation.md.flags:
--bundle
--check-claims
--rfc3161-timestamp
--signature
--type
cosign_verify-blob.md.flags:
--bundle
--rfc3161-timestamp
--signature
COUNTS:
1 --base-image-only
1 --cert
1 --cert-chain
1 --policy
2 --bundle
2 --rfc3161-timestamp
2 --type
3 --annotations
3 --attachment
3 --signature-digest-algorithm
4 --allow-http-registry
4 --allow-insecure-registry
4 --attachment-tag-prefix
4 --k8s-keychain
4 --local-image
4 --output
5 --check-claims
5 --signature
6 --certificate
6 --certificate-chain
6 --certificate-github-workflow-name
6 --certificate-github-workflow-ref
6 --certificate-github-workflow-repository
6 --certificate-github-workflow-sha
6 --certificate-github-workflow-trigger
6 --certificate-identity
6 --certificate-identity-regexp
6 --certificate-oidc-issuer
6 --certificate-oidc-issuer-regexp
6 --help
6 --insecure-ignore-sct
6 --insecure-ignore-tlog
6 --key
6 --offline
6 --output-file
6 --rekor-url
6 --sct
6 --sk
6 --slot
6 --timeout
6 --timestamp-certificate-chain
6 --verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment