Skip to content
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

chore: upstream latest judge go-witness changes from @testifysec/[email protected] #264

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
7abed11
Initial commit
kriscoleman May 10, 2023
f83ccc4
chore: Configure SAST in `.gitlab-ci.yml`, creating this file if it d…
kriscoleman May 10, 2023
7b10c3e
chore: initial commit of judge monorepo core projects
kriscoleman May 14, 2023
4f8c5a6
chore: Set up our new home for product and development planning (#7)
kriscoleman Jun 5, 2023
c7e38ea
fix(web): friendly errors
kriscoleman Jun 6, 2023
bd86a99
chore: Added issue templates for additional issue types
kriscoleman Jun 6, 2023
1cc422a
chore: Added issue templates for epic and feature
kriscoleman Jun 6, 2023
09edca9
chore: update Judge monorepo with latest judge-api change delta
kriscoleman Jun 6, 2023
a6f45fb
story: As a user I want a simple and intuitive sign-in flow
kriscoleman Jun 7, 2023
c444d6a
docs(web): added todo to move sorting logic that shouldn't be in fron…
kriscoleman Jun 7, 2023
d337140
fix(web): the dashboard attestation results should belong to the repo…
kriscoleman Jun 7, 2023
b7a4cc9
chore(web): remove of .old web ui
kriscoleman Jun 8, 2023
f58afdb
fix(web): tests all pass
kriscoleman Jun 13, 2023
38ca60b
chore: implemented prepush-if-changed so that we can only run tests f…
kriscoleman Jun 8, 2023
4127a04
chore: implemented prepush test githooks for all go subprojectsg
kriscoleman Jun 8, 2023
a8de2ad
docs: wrote docs for our githooks
kriscoleman Jun 8, 2023
e74a8ed
chore: sorted our root package.json scripts
kriscoleman Jun 8, 2023
f498109
feat: add proxies to production services for netlify deployments (#34)
mikhailswift Jun 8, 2023
d80ecc6
fix: adds missing wildcards to netlify redirects
mikhailswift Jun 8, 2023
56f9302
fix: tell kratos to return us to our current judge web instance
mikhailswift Jun 8, 2023
35993d3
chore: implemented conventioanal-commits with commitlint
kriscoleman Jun 8, 2023
120aa80
docs: updated githooks documentation for conventional commits
kriscoleman Jun 8, 2023
091622f
chore: implemented git-conventional-commits
kriscoleman Jun 8, 2023
5affbeb
fix: githooks should be frictionless
kriscoleman Jun 13, 2023
5c2f308
chore: updated subtree scripts
kriscoleman Jun 14, 2023
8b48fbe
Squashed 'subtrees/witness/' content from commit cc2478e
kriscoleman Jun 14, 2023
0582367
Merge commit '8b48fbe7d9b2266778a37ccc68929a5266898b38' as 'subtrees/…
kriscoleman Jun 14, 2023
c253411
Squashed 'subtrees/archivista/' content from commit 21ab99d
kriscoleman Jun 14, 2023
abfc7e2
Merge commit 'c253411786d22d45d6ff862aa4de1092028da9f4' as 'subtrees/…
kriscoleman Jun 14, 2023
3fc45ba
Squashed 'subtrees/go-witness/' content from commit 31e6790
kriscoleman Jun 14, 2023
9dc2edd
Merge commit '3fc45badc0336983a1be1ee8777ef7e1963e46a6' as 'subtrees/…
kriscoleman Jun 14, 2023
4e35b9a
chore: move subtrees to subtrees/ subfolder
kriscoleman Jun 14, 2023
9b334c9
chore: upgrade kratos to v13.0 (#55)
dlake89 Jun 15, 2023
9bb7934
fix: tests fail if you run npm build instead of npm start before testing
kriscoleman Jun 15, 2023
4c663a2
chore(web): implement node workflow to github workflows
kriscoleman Jun 20, 2023
a8b870b
feat: implemented metadata webhook in kratos for updating tenant meta…
kriscoleman Jun 23, 2023
183f55a
feat: upgrade kratos ui
dlake89 Jun 28, 2023
6bdf703
Squashed 'subtrees/witness-run-action/' content from commit bdd8272
kriscoleman Jun 29, 2023
19cde03
Merge commit '6bdf703fbd00f11964a3386675f6f3f02597d8fb' as 'subtrees/…
kriscoleman Jun 29, 2023
58eb00b
chore: updated conventional-commit to support subtree type
kriscoleman Jun 22, 2023
068179d
subtree(witness-run-action): onboarded the witness-run-action to the …
kriscoleman Jun 22, 2023
e0de585
chore: updated download-compress-witness.sh to support macos
kriscoleman Jun 27, 2023
344911b
chore: updated how we push subtrees to a smarter approach
kriscoleman Jun 28, 2023
5030338
subtree(witness-run-action): Merge pull request #71 from testifysec/s…
kriscoleman Jul 11, 2023
6e88165
chore(web): update the yo generators to work with monorepo OOTB
kriscoleman Jun 28, 2023
6210845
feat(web): implemented RepoCard
kriscoleman Jun 28, 2023
ab1ff8a
feat(web): implemented CommitLink component
kriscoleman Jun 28, 2023
8ed3f40
story: as a user, anytime I click on a git sha, I want to copy it the…
kriscoleman Jun 28, 2023
7765fae
ops(go): implement go ci workflow to github workflows
kriscoleman Jul 11, 2023
e1cdf01
chore: dogfood the witness-run-action on the monorepo
kriscoleman Jul 11, 2023
7c6c3c7
subtree(witness-run-action): updated docs to help users with generati…
kriscoleman Jul 11, 2023
84f5307
subtree(witness): updated `run` docs to help users with generating at…
kriscoleman Jul 11, 2023
1f0a614
subtree(witness): updated `run` docs to help users with generating at…
kriscoleman Jul 11, 2023
be5048f
ops: renamed web.yaml to node.yml
kriscoleman Jul 12, 2023
fc65b8e
chore(judge-api): use logrus directly
mikhailswift Jul 13, 2023
c40e7a1
chore(archivista): use logrus directly
mikhailswift Jul 13, 2023
c3fcecb
fix(archivista): update archivista's usage of updated go-witness func…
mikhailswift Jul 13, 2023
7fc6068
feat(monorepo): add go workspace file to monorepo
mikhailswift Jul 13, 2023
4faca88
chore(judge-api): rename go module
mikhailswift Jul 13, 2023
a3744a9
fix(monorepo): update witness-run-action version used
mikhailswift Jul 13, 2023
20edd15
chore(deps): bump yaml in /subtrees/witness-run-action
dependabot[bot] Jul 15, 2023
ee045b4
chore(judge-api): support multiple database providers
kriscoleman Jul 19, 2023
11023e2
fix(witness): witness should not error on an empty git repo with no c…
kriscoleman Jul 21, 2023
47bad29
chore: make skaffold config modular
Jul 15, 2023
5e6d721
chore: add skaffold README
Jul 22, 2023
627a7a2
chore(policy): implemented struct representing a decision on a policy
kriscoleman Jul 21, 2023
f178afe
feat(policy): judge-api has a endpoint for submitting witness verify …
kriscoleman Jul 21, 2023
dd5f718
refactor(witness): use generic registry for attestor options
mikhailswift Jul 16, 2023
100b20c
refactor(go-witness): use generic registry for attestor options
mikhailswift Jul 16, 2023
a320cba
feat(go-witness): add signer provider registry
mikhailswift Jul 17, 2023
0ba79b3
refactor: add SetOptions helper to registry, fix return values in som…
mikhailswift Jul 23, 2023
5916dcc
feat(witness): use signer registry to setup signers for CLI flags
mikhailswift Jul 23, 2023
c384030
docs(witness): regenerate docs for new cli flags
mikhailswift Jul 24, 2023
d496425
fix: use go mod download in install scripts for go modules
mikhailswift Jul 24, 2023
13cfb19
feat(go-witness): add time.Duration option for registries
mikhailswift Jul 25, 2023
45ca04d
feat(go-witness): add vault pki signer provider
mikhailswift Jul 25, 2023
aa6ee8a
refactor(witness): create helper function to add options from registries
mikhailswift Jul 24, 2023
c4b55f6
docs(witness): regenerate docs for new cli flags
mikhailswift Jul 25, 2023
fdb3800
fix(witness): re-enable verify tests
mikhailswift Jul 25, 2023
2cb7902
fix: fix remotes:add:all script
mikhailswift Jul 25, 2023
5b44ffe
Squashed 'subtrees/witness/' changes from cc2478e..8a53d68
mikhailswift Jul 25, 2023
4bd19be
feat(policy, witness): added decisionLogUrl argument to verify
kriscoleman Aug 4, 2023
400ea6c
feat(policy, go-witness): implemented decisionLogUrl and also impleme…
kriscoleman Aug 3, 2023
a792042
subtree(go-witness): downstream v0.1.17 cd0c222058a8830a8e190b840e466…
kriscoleman Aug 23, 2023
99d7fdb
subtree(witness): downstream v0.1.14 be20100af602c780deeef50c54f53386…
kriscoleman Aug 23, 2023
277ec7a
Squashed 'subtrees/witness/' changes from 8a53d68..be20100
kriscoleman Aug 23, 2023
79a3d6b
Revert "feat(policy, go-witness): implemented decisionLogUrl and also…
kriscoleman Aug 3, 2023
f5c8bd9
Revert "feat(policy): judge-api has a endpoint for submitting witness…
kriscoleman Oct 17, 2023
d7c7372
Revert "chore(policy): implemented struct representing a decision on …
kriscoleman Jul 21, 2023
908791b
subtree(go-witness): downstream v0.2.0 a0b8cc8
nkane Jan 18, 2024
250f7c5
Squashed 'subtrees/witness/' changes from be20100..06031da
nkane Jan 19, 2024
edec478
subtree(witness): downstream v0.2.0 250f7c5
nkane Jan 19, 2024
777d8bb
Merge branch 'main' into chore/subtree-witness-update
kriscoleman Jan 19, 2024
ceb1961
subtree(go-witness): downstream v[0.3.1] [8fbc70b1d7db128d88f2aba60e1…
kriscoleman Apr 1, 2024
3162777
Squashed 'subtrees/witness/' changes from 06031da4..74f6c3dc
kriscoleman Apr 1, 2024
1547bd9
subtree(witness): downstream v[0.3.1] [74f6c3dcb07ad6b6c2e67eede125bc…
kriscoleman Apr 1, 2024
8917fb5
chore(go-witness): update go-witness to use new store with http clien…
kriscoleman Apr 1, 2024
766aa6d
chore: onboarding aws and localstack
kriscoleman Apr 10, 2024
88d7370
chore(deps): bump the go_modules group across 3 directories with 3 up…
dependabot[bot] Apr 29, 2024
113c869
subtree(go-witness): add git refs to go witness git attestor
nkane May 20, 2024
873147c
chore(deps): bump the go_modules group across 3 directories with 2 up…
dependabot[bot] May 31, 2024
f014fc2
subtree(go-witness): downstream v0.4.0 94c5d38633598ff387fcec2f1456e5…
kriscoleman Jun 4, 2024
d807867
Squashed 'subtrees/witness/' changes from 74f6c3dcb..47b6e1cc1
kriscoleman Jun 4, 2024
2464c2b
subtree(witness): downstream v0.4.0 47b6e1cc1cdb55b2eb4c5610111514a73…
kriscoleman Jun 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion archivista/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
)

func (c *Client) Store(ctx context.Context, env dsse.Envelope) (string, error) {
resp, err := archivistaapi.Upload(ctx, c.url, env)
resp, err := archivistaapi.Store(ctx, c.url, env)

Check failure on line 25 in archivista/store.go

View workflow job for this annotation

GitHub Actions / lint

SA1019: archivistaapi.Store is deprecated: Use Upload instead. It will be removed in version >= v0.6.0 (staticcheck)
if err != nil {
return "", err
}
Expand Down
10 changes: 10 additions & 0 deletions attestation/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ type Attestor struct {
Refs []string `json:"refs,omitempty"`
Remotes []string `json:"remotes,omitempty"`
Tags []Tag `json:"tags,omitempty"`
RefNameShort string `json:"branch,omitempty"`
}

func New() *Attestor {
Expand Down Expand Up @@ -184,6 +185,7 @@ func (a *Attestor) Attest(ctx *attestation.AttestationContext) error {
a.CommitDate = commit.Author.When.String()
a.CommitMessage = commit.Message
a.Signature = commit.PGPSignature
a.RefNameShort = head.Name().Short()

for _, parent := range commit.ParentHashes {
a.ParentHashes = append(a.ParentHashes, parent.String())
Expand Down Expand Up @@ -289,6 +291,14 @@ func (a *Attestor) Subjects() map[string]cryptoutil.DigestSet {
subjects[subjectName] = ds
}

// add refname short
subjectName = fmt.Sprintf("refnameshort:%v", a.RefNameShort)
ds, err = cryptoutil.CalculateDigestSetFromBytes([]byte(a.RefNameShort), hashes)
if err != nil {
return nil
}
subjects[subjectName] = ds

return subjects
}

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.6 // indirect
github.com/letsencrypt/boulder v0.0.0-20240226214708-a97e074b5a3e // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4=
github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI=
github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
Expand Down
Loading