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

feat!: move rdimitrov/go-tuf-metadata to github.com/theupdateframework/go-tuf/v2 #583

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
b76646f
Remove legacy go-tuf code
rdimitrov Jan 24, 2024
2f22f0a
Initial commit
rdimitrov Nov 14, 2022
e3fb769
update basic_repo.go example
rdimitrov Dec 2, 2022
f29347f
Update README.md
rdimitrov Dec 2, 2022
7a97b4f
update example to use the placeholder repo instance
rdimitrov Dec 2, 2022
3485d06
implement verifiers for length and hash
rdimitrov Dec 3, 2022
de9cb26
set consistent snapshots to true when init
rdimitrov Dec 3, 2022
610ee9f
add version check for metafiles
rdimitrov Dec 4, 2022
193985a
remove delegations object when creating targets metadata
rdimitrov Dec 4, 2022
f4f285b
use variable for custom values
rdimitrov Dec 4, 2022
ad6cffe
fix rsa and ecdsa key type support
rdimitrov Dec 4, 2022
1cff8e2
implement GetRolesForTarget
rdimitrov Dec 5, 2022
4dcbb08
implement trusted metadata set
rdimitrov Dec 5, 2022
43f8868
tidy up code and rename repo to repository
rdimitrov Dec 6, 2022
a298a28
rename to go-tuf-metadata
rdimitrov Dec 7, 2022
c3b1ad4
update README.md and testdata
rdimitrov Dec 7, 2022
db83b72
proceed implementing the Updater - implement loadTargets
rdimitrov Dec 8, 2022
4cc0bd6
complete the Updater implementation
rdimitrov Dec 8, 2022
85d1591
ed25519 public key should be hex only
rdimitrov Dec 8, 2022
ca55d5a
restructure example folder
rdimitrov Dec 9, 2022
ceb1ffa
introduce logrus and restructure file layout
rdimitrov Dec 9, 2022
cf43183
add bsd-2 licensing
rdimitrov Jan 13, 2023
ee8aeb4
Update license name so it matches the GitHub license keyword
rdimitrov Jan 13, 2023
5aba429
add code of conduct, contributing and gitignore files
rdimitrov Jan 13, 2023
aee21ad
update readme
rdimitrov Jan 13, 2023
e762870
fix formatting for code of conduct
rdimitrov Jan 13, 2023
ff78023
Create dependabot.yml
rdimitrov Jan 13, 2023
877439d
chore(deps): bump github.com/sigstore/sigstore from 1.4.4 to 1.5.0
dependabot[bot] Jan 13, 2023
2441c9b
chore(deps): bump golang.org/x/crypto from 0.4.0 to 0.5.0
dependabot[bot] Jan 16, 2023
7f287d1
chore: update code comments, license year and init testing (#3)
rdimitrov Jan 19, 2023
20ebbef
chore: add tests for metadata default values
rdimitrov Jan 19, 2023
dd441b7
fix: rename master to main in ci.yml
rdimitrov Jan 19, 2023
d9c1dad
fix: rename master to main in codeql-analysis.yml
rdimitrov Jan 19, 2023
2607e93
chore: add badges for license and build status
rdimitrov Jan 19, 2023
0ccff5e
chore: add badge for pkg.go.dev
rdimitrov Jan 19, 2023
0c3adfe
chore: add link to pkg.do.dev in README
rdimitrov Jan 19, 2023
5959691
chore(deps): bump github.com/sigstore/sigstore from 1.5.0 to 1.5.1 (#4)
dependabot[bot] Jan 23, 2023
0c59134
add goreport badge to readme
rdimitrov Jan 24, 2023
5dcb5df
chore: add custom error types
rdimitrov Feb 9, 2023
c486b7f
chore: update gh workflow and README
rdimitrov Feb 9, 2023
70dc7a6
chore: refactor some of the comments
rdimitrov Feb 10, 2023
d330e5b
fix: root update failed due to wrong err type check
rdimitrov Feb 13, 2023
a6d6618
fix: target update length check
rdimitrov Feb 13, 2023
f50c97e
fix: handle target path matches correctly and add test cases
rdimitrov Feb 13, 2023
15e2037
fix: change default value for hash prefixed targets
rdimitrov Feb 13, 2023
3a20d44
fix: populate TargetFiles.Path and do not fail when looking for cache…
rdimitrov Feb 13, 2023
19bb59f
fix: revert deleted hexbytes methods
rdimitrov Feb 14, 2023
0990a83
fix: support python-tuf ecdsa keytype value
rdimitrov Feb 14, 2023
fb693a0
feat: add initial version for client_example.go
rdimitrov Feb 14, 2023
ba597e3
fix: basic_repository.go: targetpath did not match the delegatee path…
rdimitrov Feb 14, 2023
758d573
chore(deps): bump golang.org/x/crypto from 0.5.0 to 0.6.0 (#5)
dependabot[bot] Feb 14, 2023
d1b22ba
test: add test for ClearSignatures()
rdimitrov Feb 14, 2023
7c4e6a2
tests: add a few unit tests for metadata
rdimitrov Feb 14, 2023
a4613f6
tests: add tests for custom fields in the Signed part
rdimitrov Feb 14, 2023
5cb4701
chore: refactor client_example.go
rdimitrov Feb 15, 2023
ff14203
chore(deps): bump github.com/secure-systems-lab/go-securesystemslib (#6)
dependabot[bot] Feb 20, 2023
7e41c9f
chore(deps): bump golang.org/x/net from 0.6.0 to 0.7.0 (#7)
dependabot[bot] Feb 20, 2023
66725e1
chore: disable length check until it is not reliable
rdimitrov Feb 18, 2023
525c190
feat: add support for unrecognized json fields
rdimitrov Feb 18, 2023
6662679
chore: use Jussi's github demo as a repository for the client_example.go
rdimitrov Feb 18, 2023
ab3f2d7
fix: check for nil when marshaling unrecognized metadata fields
rdimitrov Feb 20, 2023
0ec31d1
docs: update the readme
rdimitrov Feb 20, 2023
9c80731
fix: add workaround to support sslib key type value of ecdsa
rdimitrov Feb 22, 2023
b62a1aa
feat: add support for succinct roles and hashbin delegations
rdimitrov Feb 23, 2023
df3e810
chore: add an option to specify trusted root path in Updater
rdimitrov Feb 24, 2023
089c15b
feat: add initial tuf-client cli
rdimitrov Feb 24, 2023
48ff83e
docs: update readme.md for client cli
rdimitrov Feb 24, 2023
4bc9ce9
tests: fix custom field tests
rdimitrov Feb 24, 2023
22df3da
fix: update golangci-lint config and fix reported errors
rdimitrov Feb 24, 2023
aa227e4
chore: remove false check for client_example.go
rdimitrov Feb 24, 2023
5636b72
fix: codeql reported error
rdimitrov Feb 24, 2023
f403fad
chore: refactor package layout for tuf-client cli
rdimitrov Feb 24, 2023
e3ee907
chore(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#8)
dependabot[bot] Feb 27, 2023
c09e2c0
chore(deps): bump github.com/sigstore/sigstore from 1.5.1 to 1.5.2 (#9)
dependabot[bot] Feb 27, 2023
2a429c7
chore(deps): bump github.com/spf13/cobra from 1.6.0 to 1.6.1 (#10)
dependabot[bot] Feb 27, 2023
cbe1d3b
chore: delete NOTES.md file
rdimitrov Feb 27, 2023
5eadd5f
chore: add license notes and template the tuf repository cli
rdimitrov Feb 27, 2023
e5831a4
chore: add Makefile
rdimitrov Feb 27, 2023
901c6d6
chore: update readme
rdimitrov Feb 27, 2023
d7d6c3c
docs: fix typo
rdimitrov Feb 27, 2023
01743a1
docs: update readme.md
rdimitrov Feb 27, 2023
0b9b4bc
docs: update readme.md
rdimitrov Feb 27, 2023
9d0057d
docs: update readme.md
rdimitrov Feb 27, 2023
84ce7d2
chore: update readme and fix linting error
rdimitrov Feb 27, 2023
8c39f79
chore: remove custom field from metafiles object
rdimitrov Feb 28, 2023
9d92f46
chore: update readme and directory layout for cli
rdimitrov Mar 1, 2023
f2fb66c
chore: change tuf-client cli target flag name
rdimitrov Mar 1, 2023
4c66e3b
chore: make clear ignore if not exists
rdimitrov Mar 1, 2023
df62369
chore: add example make target with root-signing repository
rdimitrov Mar 1, 2023
5e8d3ba
chore: remove leftover env vars in makefile
rdimitrov Mar 1, 2023
6a77989
chore(deps): bump golang.org/x/crypto from 0.6.0 to 0.7.0 (#29)
dependabot[bot] Mar 6, 2023
cb70d50
chore(deps): bump github.com/sigstore/sigstore from 1.5.2 to 1.6.0 (#28)
dependabot[bot] Mar 6, 2023
44e84f3
chore: test against root-signing sigstore repo
rdimitrov Mar 7, 2023
9876678
chore: remove custom field from top-level metadata
rdimitrov Mar 7, 2023
20ed0bf
fix: hash-prefixed target files support
rdimitrov Mar 7, 2023
0a12f5a
fix: make hash prefixed targetfiles enabled by default
rdimitrov Mar 7, 2023
0f30f9b
chore: improve handling for unrecognised fields
rdimitrov Mar 7, 2023
88b46cb
tests: update unrecognised field tests
rdimitrov Mar 7, 2023
1392149
chore: fix typo
rdimitrov Mar 7, 2023
ffb58d4
chore: remove obsolete new lines
rdimitrov Mar 7, 2023
89455ce
feat: add support for getting all top-level targets
rdimitrov Mar 9, 2023
f3dbc5d
chore: support GetTrustedMetadataSet() with Updater
rdimitrov Mar 10, 2023
6e95a29
feat: add option to disable local cache and refactor config usage
rdimitrov Mar 10, 2023
90c6f65
chore: pass trusted root path directly to config in examples
rdimitrov Mar 10, 2023
c81a12c
chore: return byte representation of a target
rdimitrov Mar 10, 2023
287a917
feat: add support for bootstrapping a TUF client using root.json bytes
rdimitrov Mar 10, 2023
9f93f69
feat: add support for comparing target files
rdimitrov Mar 10, 2023
4c1b11a
chore: move all marshal/unmarshal methods to a separate file
rdimitrov Mar 10, 2023
120f108
chore: move copyMapValues to marshal.go
rdimitrov Mar 10, 2023
9b722b5
chore: update client example
rdimitrov Mar 10, 2023
aa3d6ea
fix: wrong path to loadLocalMetadata and error comparing
rdimitrov Mar 10, 2023
4b13803
chore: update client example
rdimitrov Mar 10, 2023
36d1bc3
chore: remove duplicated function
rdimitrov Mar 11, 2023
7bda5a0
chore: initialize client only with root bytes
rdimitrov Mar 15, 2023
214dbca
chore: update examples with the new init format
rdimitrov Mar 15, 2023
1e74607
feat: implement TAP4 - multirepo package
rdimitrov Mar 15, 2023
d2b439c
chore: fix linting
rdimitrov Mar 16, 2023
ff563e3
chore: fix linting
rdimitrov Mar 16, 2023
fc11a25
chore: fix remote url for multirepo example and update readme files
rdimitrov Mar 16, 2023
837cea0
chore: remove unused variable
rdimitrov Mar 16, 2023
9a83127
chore: fix when we exit during multi-repo target lookup
rdimitrov Mar 16, 2023
47c4d5e
chore: update client example
rdimitrov Mar 16, 2023
61253c8
chore: add another mapping to the multi-repo example
rdimitrov Mar 16, 2023
037b37a
chore: add demo targets to multi repo to download
rdimitrov Mar 16, 2023
0c4f6fb
chore: look for cached target too in multirepo client
rdimitrov Mar 16, 2023
b1f7718
fix: handle error type comparision properly
rdimitrov Mar 20, 2023
0d151ba
chore: change multirepo client to initialize from bytes
rdimitrov Mar 20, 2023
32632e6
chore: fix linting
rdimitrov Mar 20, 2023
84eb553
chore: update GetTopLevelTargets and make client config public
rdimitrov Mar 21, 2023
ba7cd43
chore: update multi-repo example
rdimitrov Mar 21, 2023
7bed7d5
chore: update multi-repo example
rdimitrov Mar 21, 2023
fd677fb
chore: update license headers
rdimitrov Mar 21, 2023
a0b4548
chore: update multirepo search to fail when it finds more than one match
rdimitrov Mar 24, 2023
29c3a03
chore: update comment in multirepo
rdimitrov Mar 24, 2023
0003677
chore: update comment in multirepo.go
rdimitrov Mar 24, 2023
43b2b8b
chore(deps): bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (#31)
dependabot[bot] Apr 10, 2023
34e03d9
chore(deps): bump golang.org/x/crypto from 0.7.0 to 0.8.0 (#33)
dependabot[bot] Apr 10, 2023
c8eb46b
chore(deps): bump github.com/sigstore/sigstore from 1.6.0 to 1.6.1 (#32)
dependabot[bot] Apr 10, 2023
fa3eea3
chore(deps): bump github.com/sigstore/sigstore from 1.6.1 to 1.6.2 (#34)
dependabot[bot] Apr 18, 2023
992981f
chore(deps): bump github.com/sigstore/sigstore from 1.6.2 to 1.6.3 (#35)
dependabot[bot] Apr 27, 2023
d7771e3
chore(deps): bump github.com/sigstore/sigstore from 1.6.3 to 1.6.4 (#36)
dependabot[bot] May 18, 2023
0de8d9c
chore(deps): bump golang.org/x/crypto from 0.8.0 to 0.9.0 (#38)
dependabot[bot] May 18, 2023
0c9a2de
chore(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (#40)
dependabot[bot] May 22, 2023
6f101d6
chore(deps): bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2 (#39)
dependabot[bot] May 22, 2023
1817640
chore(deps): bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3 (#41)
dependabot[bot] Jun 5, 2023
b2248be
chore(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#42)
dependabot[bot] Jun 5, 2023
16b055b
chore(deps): bump github.com/sigstore/sigstore from 1.6.4 to 1.6.5 (#43)
dependabot[bot] Jun 5, 2023
c3f90d3
chore: update make targets
rdimitrov Jun 7, 2023
0fb5822
chore: update metadata files for multirepo example
rdimitrov Jun 7, 2023
5d2ca98
chore: update multirepo example so trusted root meta is copied to cli…
rdimitrov Jun 7, 2023
6ea63a0
chore: init goreleaser
rdimitrov Jun 8, 2023
439d902
Add unit tests for config / fetcher / repo (#44)
ivanayov Jun 13, 2023
214bd9a
chore(deps): bump golang.org/x/crypto from 0.9.0 to 0.10.0 (#48)
dependabot[bot] Jun 19, 2023
879dae9
chore(deps): bump github.com/sigstore/sigstore from 1.6.5 to 1.7.0 (#49)
dependabot[bot] Jun 19, 2023
499364f
tests: update fetcher tests (#47)
rdimitrov Jun 22, 2023
4e9ebfa
fix: fix UnmarshalJSON overwrite methods
rdimitrov Jun 22, 2023
1705e7c
test: run all examples as partial e2e verification
rdimitrov Jun 22, 2023
a601b2c
fix: remove sync lock for keyID generation
rdimitrov Jun 22, 2023
86db62c
chore(deps): bump github.com/sigstore/sigstore from 1.7.0 to 1.7.1 (#50)
dependabot[bot] Jun 26, 2023
f164dd8
chore(deps): bump golang.org/x/crypto from 0.10.0 to 0.11.0 (#51)
dependabot[bot] Jul 10, 2023
3f37cb5
chore(deps): bump github.com/secure-systems-lab/go-securesystemslib (…
dependabot[bot] Jul 17, 2023
c57dd43
test: add metadata unit tests (#45)
ivanayov Jul 25, 2023
bc83b5e
chore: add govulncheck and bump Go to 1.20
rdimitrov Jul 25, 2023
9e638c5
test: regenerate multirepo metadata
rdimitrov Aug 18, 2023
a3ae2f8
ci: separate examples from test workflows
rdimitrov Aug 18, 2023
9a9f485
chore(deps): bump golang.org/x/crypto from 0.11.0 to 0.12.0 (#53)
dependabot[bot] Aug 18, 2023
55ff059
chore(deps): bump github.com/sigstore/sigstore from 1.7.1 to 1.7.2 (#55)
dependabot[bot] Aug 18, 2023
91d8435
Metadata tests followup (#54)
ivanayov Aug 18, 2023
eb58c30
test: stop using succinct delegations in examples
rdimitrov Aug 23, 2023
f86ad41
Add trusted metadata set tests (#56)
ivanayov Aug 23, 2023
51c8c2c
chore: update URL for sigstore-tuf-root (#59)
MDr164 Aug 31, 2023
f9a18ab
test: convert config tests to table driven tests (#60)
MDr164 Aug 31, 2023
8df1341
feat: logger rework (#58)
MDr164 Sep 1, 2023
b38e4eb
feat: fetcher timeout and length limit (#61)
MDr164 Sep 1, 2023
4d49dcc
chore(deps): bump golang.org/x/sys from 0.11.0 to 0.12.0 (#63)
dependabot[bot] Sep 4, 2023
3b7fce7
Add updater tests (#65)
ivanayov Sep 27, 2023
3314bd1
ci: properly calculate coverage for metadata package (#68)
MDr164 Sep 27, 2023
eb5dee8
chore(deps): bump github.com/sigstore/sigstore from 1.7.2 to 1.7.3 (#64)
dependabot[bot] Sep 27, 2023
05f23f3
chore(deps): bump golang.org/x/crypto from 0.12.0 to 0.13.0 (#66)
dependabot[bot] Sep 27, 2023
93c7d13
chore(deps): bump github.com/sirupsen/logrus from 1.9.1 to 1.9.3 (#69)
dependabot[bot] Oct 2, 2023
3de1ec4
chore(deps): bump golang.org/x/crypto from 0.13.0 to 0.14.0 (#70)
dependabot[bot] Oct 10, 2023
59ca549
chore(deps): bump golang.org/x/net from 0.14.0 to 0.17.0 (#72)
dependabot[bot] Oct 12, 2023
c5675ad
chore(deps): bump github.com/sigstore/sigstore from 1.7.3 to 1.7.4 (#73)
dependabot[bot] Oct 16, 2023
25fab3d
chore(deps): bump google.golang.org/grpc from 1.55.0 to 1.56.3 (#74)
dependabot[bot] Oct 26, 2023
4067d11
fix: update examples with new jku/tuf-demo metadata
rdimitrov Oct 27, 2023
3e5d150
chore: bump go to 1.21
rdimitrov Oct 27, 2023
9574caf
chore(deps): bump github.com/sigstore/sigstore from 1.7.4 to 1.7.5 (#77)
dependabot[bot] Oct 30, 2023
b4a1983
chore(deps): bump github.com/go-logr/logr from 1.2.4 to 1.3.0 (#76)
dependabot[bot] Oct 30, 2023
426250f
chore(deps): bump golang.org/x/sys from 0.13.0 to 0.14.0 (#78)
dependabot[bot] Nov 6, 2023
077b087
chore(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#79)
dependabot[bot] Nov 6, 2023
9b8deba
Add Trivy scan to workflow
rdimitrov Nov 6, 2023
931f74a
Update README
rdimitrov Nov 6, 2023
a142637
Use pinned actions
rdimitrov Nov 6, 2023
1bdd94e
Enroll go-tuf-metadata to Minder and store profile
rdimitrov Nov 6, 2023
19d3aa2
chore(deps): bump golang.org/x/crypto from 0.14.0 to 0.15.0 (#81)
dependabot[bot] Nov 28, 2023
dd861e9
Update the multirepo example metadata
rdimitrov Nov 28, 2023
a6d533d
Updated the default ecdsa p256 key type to not include any parameters…
kommendorkapten Dec 1, 2023
a4e8e5f
Remove logr dep (#83)
kommendorkapten Dec 4, 2023
8ec1718
chore(deps): bump golang.org/x/sys from 0.14.0 to 0.15.0 (#85)
dependabot[bot] Dec 4, 2023
0c0a360
chore: split actions to tests and linting (#89)
rdimitrov Dec 8, 2023
4f5046b
Added an unsafe method for loading the tuf metadata on disk (#87)
kommendorkapten Dec 8, 2023
64d5e15
chore(deps): bump golang.org/x/crypto from 0.15.0 to 0.16.0 (#84)
dependabot[bot] Dec 8, 2023
c0014df
chore(deps): bump github.com/sigstore/sigstore from 1.7.5 to 1.7.6 (#90)
dependabot[bot] Dec 11, 2023
67b624e
chore(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0 (#92)
dependabot[bot] Dec 27, 2023
5bf5351
chore(deps): bump github.com/sigstore/sigstore from 1.7.6 to 1.8.0 (#93)
dependabot[bot] Dec 27, 2023
68b2a57
chore(deps): bump golang.org/x/sys from 0.15.0 to 0.16.0 (#95)
dependabot[bot] Jan 9, 2024
3b01d64
chore(deps): bump golang.org/x/crypto from 0.17.0 to 0.18.0 (#96)
dependabot[bot] Jan 19, 2024
082c914
Move from rdimitov/go-tuf-metadata to github.com/theupdateframework/g…
rdimitrov Jan 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .gitattributes

This file was deleted.

18 changes: 0 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

8 changes: 8 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
project:
default:
# basic
target: auto
threshold: 5%
patch: off
40 changes: 5 additions & 35 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Monitor Go dependencies
Expand All @@ -6,41 +11,6 @@ updates:
schedule:
interval: "weekly"
time: "10:00"
groups:
minor-patch:
update-types:
- "minor"
- "patch"
commit-message:
prefix: "chore"
include: "scope"
open-pull-requests-limit: 10
# Monitor Github Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
time: "10:00"
groups:
minor-patch:
update-types:
- "minor"
- "patch"
commit-message:
prefix: "chore"
include: "scope"
open-pull-requests-limit: 10
# Monitor Python test dependencies
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
time: "10:00"
groups:
minor-patch:
update-types:
- "minor"
- "patch"
commit-message:
prefix: "chore"
include: "scope"
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/auto-merge.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/changelog.yml

This file was deleted.

30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Copyright 2022-2023 VMware, Inc.
#
# This product is licensed to you under the BSD-2 license (the "License").
# You may not use this product except in compliance with the BSD-2 License.
# This product may include a number of subcomponents with separate copyright
# notices and license terms. Your use of these subcomponents is subject to
# the terms and conditions of the subcomponent's license, as noted in the
# LICENSE file.
#
# SPDX-License-Identifier: BSD-2-Clause
on:
pull_request:
push:
branches:
- "master"
- "main"
tags:
- "v*"
name: CI
permissions:
contents: write
jobs:
linting:
uses: ./.github/workflows/linting.yml
tests:
uses: ./.github/workflows/tests.yml
tuf:
needs: tests
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ./.github/workflows/release.yml
with:
cli-name: tuf
tuf-client:
needs: tests
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ./.github/workflows/release.yml
with:
cli-name: tuf-client
examples:
uses: ./.github/workflows/examples.yml
62 changes: 32 additions & 30 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [main]
schedule:
- cron: '25 14 * * 6'
- cron: "25 14 * * 6"

jobs:
analyze:
Expand All @@ -32,39 +32,41 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
language: ["go"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
with:
go-version-file: 'go.mod'
cache: false
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@74483a38d39275f33fcff5f35b679b5ca4a26a99
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@74483a38d39275f33fcff5f35b679b5ca4a26a99

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@74483a38d39275f33fcff5f35b679b5ca4a26a99
103 changes: 103 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Copyright 2022-2023 VMware, Inc.
#
# This product is licensed to you under the BSD-2 license (the "License").
# You may not use this product except in compliance with the BSD-2 License.
# This product may include a number of subcomponents with separate copyright
# notices and license terms. Your use of these subcomponents is subject to
# the terms and conditions of the subcomponent's license, as noted in the
# LICENSE file.
#
# SPDX-License-Identifier: BSD-2-Clause
on:
workflow_call:
name: Examples # not exactly right to test functionality in such a way but it does act as a set of end to end test cases for the time being, nevertheless should be updated
jobs:
get-go-versions:
name: Collect available Go versions
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.versions.outputs.matrix }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: arnested/go-version-action@b556f8d91b644164318c709d28b9083eaf0c064d
id: versions
client:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
steps:
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- name: Setup - Go ${{ matrix.go-version }}
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
with:
go-version: ${{ matrix.go-version }}
- run: make example-client
repository:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
steps:
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- name: Setup - Go ${{ matrix.go-version }}
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
with:
go-version: ${{ matrix.go-version }}
- run: make example-repository
multirepo:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
steps:
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- name: Setup - Go ${{ matrix.go-version }}
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
with:
go-version: ${{ matrix.go-version }}
- run: make example-multirepo
tuf-client-cli:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
steps:
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- name: Setup - Go ${{ matrix.go-version }}
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
with:
go-version: ${{ matrix.go-version }}
- run: make example-tuf-client-cli
root-signing:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
steps:
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- name: Setup - Go ${{ matrix.go-version }}
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
with:
go-version: ${{ matrix.go-version }}
- run: make example-root-signing
Loading