Commit graph

40 commits

Author SHA1 Message Date
Yongjae Chung
dfd67f142a add cmd list-global-rules
Signed-off-by: Yongjae Chung <yongjae354@berkeley.edu>
2025-03-05 13:27:50 -05:00
Aditya Sirish A Yelgundhalli
00fb1658f4
*: Add and remove propagation workflows from metadata
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-02-05 10:46:02 -05:00
Aditya Sirish
d5df401da5
cmd: Fix help message
Signed-off-by: Aditya Sirish <aditya@saky.in>
2025-01-23 14:23:27 -05:00
Aditya Sirish
20780c2d84
*: Initial support for naming for gittuf app
gittuf has a companion app for GitHub that can record attestations for
pull request reviews. Previously, the app was identified by its signing
key. This commit adds initial support for naming the app, with an eye
towards eventually supporting attestations from multiple apps.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2025-01-23 13:34:42 -05:00
Aditya Sirish
a6c296b92e
Merge pull request #740 from gittuf/root-location
*: Add repositoryLocation to root metadata
2025-01-16 15:21:44 -05:00
Aditya Sirish A Yelgundhalli
72f47b06d0
*: Add repositoryLocation to root metadata
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-01-16 15:10:29 -05:00
Horiodino
deb011a9bf *: Add support for removing global rules
Signed-off-by: Horiodino <holiodin@gmail.com>

Update test-cases for global-rules

Signed-off-by: Horiodino <holiodin@gmail.com>

Add cmd for remove-global-rule

Signed-off-by: Horiodino <holiodin@gmail.com>

Handling RemoveGlobalRuleThreshold and RemoveGlobalRuleBlockForcePushes rule

Signed-off-by: Horiodino <holiodin@gmail.com>

Update docs

Signed-off-by: Horiodino <holiodin@gmail.com>

fixed minor bugs

Signed-off-by: Horiodino <holiodin@gmail.com>

Handling RemoveGlobalRuleThreshold and RemoveGlobalRuleBlockForcePushes rule

Signed-off-by: Horiodino <holiodin@gmail.com>
2025-01-16 13:05:30 -05:00
Aditya Sirish
3e24f4ceaf
*: Support multiple types of global rules
This commit adds support for different types of global rules (i.e., non
threshold constraints). This commit also adds a global rule to block
force pushes to one or more specified refs.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2025-01-09 19:14:29 -05:00
Aditya Sirish
96516300f6
*: Add support for global rules
This commit adds initial support for "global rules" that set baselines
that must be met during verification. Currently, the global rule only
enforces threshold rules. Each rule is enforced by inspecting the set of
principals successfully verified for a change. If a change is not
protected explicitly, then it's verified using all principals in the
policy.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2025-01-09 17:03:39 -05:00
Pat Zielinski
4a7bc7e168 *: Move and update signing key checks
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2024-11-11 18:05:39 -05:00
Aditya Sirish A Yelgundhalli
ede40dc5e0
cmd, gittuf: Move key / signer APIs to gittuf
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-10-23 15:59:25 -04:00
Aditya Sirish A Yelgundhalli
eda8a89e2a
repository -> gittuf: Expose a gittuf Go API
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-10-23 13:30:35 -04:00
Aditya Sirish A Yelgundhalli
f1473c53e5
*: Add sigstore signer for metadata
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-10-09 16:13:01 -04:00
Pat Zielinski
3829d966c3 cmd: Drop devmode requirement for root and policy thresholds
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2024-10-01 11:18:59 -04:00
Pat Zielinski
d571facb8d *: Add copyright notice to code files
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2024-09-27 15:28:12 -04:00
Aditya Sirish A Yelgundhalli
575234ce05
*: Update code review approval layer to be forge agnostic and clarify docs
The code review approval layer is now agnostic to the code review system used.
The only system supported at the moment is GitHub's pull request approvals, but
we should be able to extend this to support GitLab, Gerrit, etc.

In addition, the GitHub app key add endpoint docs have been updated to clarify
what the purpose of the key is.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-08-14 11:16:58 -04:00
Aditya Sirish A Yelgundhalli
d8f72d9fef
*: Add support for GitHub pull request approval attestation
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-08-14 11:16:28 -04:00
Aditya Sirish A Yelgundhalli
898e2eb472 cmd: Wire up ssh-keygen support
Drops support for legacy securesystemslib key format in the CLI.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-06-17 10:06:08 -04:00
Aditya Sirish
313509d3d9
cmd: Move apply to trust / policy cmds
For consistency, this makes apply a subcommand of both trust and policy
commands.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-05-07 16:08:15 -04:00
Pat Zielinski
5286631fb3 cmd: Rework signing-key flag check
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2024-05-03 11:21:37 -04:00
Aditya Sirish
52491aa0f0
cmd, repository, policy: Root threshold
Add command to update root of trust threshold.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-04-26 10:16:57 -04:00
Aditya Sirish
f41f6e5ca7
repository, cmd: Just sign staged root
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-04-26 10:16:57 -04:00
Aditya Sirish
e8e3fcc01d
cmd: Initial support for thresholds
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-02-28 13:42:23 -05:00
Aditya Sirish
8874a3420b
cmd: Update for new repository APIs
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-01-15 00:23:47 -05:00
Aditya Sirish
0ee820ba37
*: Use tuf.Key for public keys
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-01-14 23:47:27 -05:00
Billy Lynch
0eb7030d71
Generate CLI docs.
Adds `DisableAutoGenTag: true` to disable timestamp in generated docs.

Signed-off-by: Billy Lynch <billy@chainguard.dev>
2024-01-12 11:50:27 -05:00
Aditya Sirish
f4ade6f91a
cmd: Add support for PEM encoded keys
Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-01-09 12:44:04 -05:00
neilnaveen
c9a3b576b3 Added add and remove root keys to cmd
- Added functionality to cmd to add and remove root keys from, which
  needs a key already in the root to allow adding or removing keys from
  the root.
- Partially fixes issue https://github.com/gittuf/gittuf/issues/117

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
2023-12-28 13:05:39 -06:00
Aditya Sirish
21147a0ac6
Merge pull request #186 from spectre10/spectre10/fix-persistent-signingkey
fix: signing-key required on policy remote sub-commands.
2023-11-13 16:42:34 -05:00
spectre10
85d5f5195a
fix: signing-key required for remote subcommands.
Signed-off-by: spectre10 <shyamthakkar001@gmail.com>
2023-11-14 02:56:55 +05:30
Pat Zielinski
d6c45fe479 *: Check if signing viable before running commands
This commit has gittuf check if signing using the user's
signing key (specified in the git configuration) is possible
for commands that require this. This is done by way of a
function in cmd/common/common.go, called in commands' PreRunE.

Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2023-11-13 15:05:30 -05:00
Aditya Sirish
a95ec8df43
*: Fix linter issues
This commit fixes issues flagged by the additional linters enabled in
the parent commit.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-10-24 16:48:46 -04:00
Aditya Sirish
c323a6a108
cmd: Add remote push for trust and policy
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-10-17 11:37:08 -04:00
Pat Zielinski
d0905e7816 Add SPDX License Identifiers to code files
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2023-10-09 08:09:34 -04:00
Aditya Sirish
3f89457c31
cmd: Use cmd.Context instead of context.Background
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-09-12 17:40:31 -04:00
Aditya Sirish
3192cdb861
Rename module to use gittuf org
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-08-30 13:13:54 -04:00
Aditya Sirish
0d4be41b91
Early gitsign support
This commit introduces early, experimental support for gitsign
signatures on git commits. It uses TAP-18 to specify sigstore identity
constraints in delegations.

The feature introduced here depends on unreleased prototype code in
go-securesystemslib and is also insufficiently tested due to some
sigstore library constraints.

See: #73

Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-08-07 15:27:37 -04:00
Aditya Sirish
1fa0cfc845
cmd: Update documentation to highlight GPG support
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-06-20 16:24:28 -07:00
Aditya Sirish
d4d32673a8
cmd: Add PGP key support
Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-06-20 16:17:23 -07:00
Aditya Sirish
31035b843c
cmd: Refactor entirely
This is a full fledged refactor of the cmd package based on this comment:
https://github.com/adityasaky/gittuf/pull/41#discussion_r1198995982.

First, the dev subcommand is retired as it was necessary to test certain
RSL functions which have now been built. The subcommand also printed out
the git config, again something we no longer need. To that end,
GetConfig() in gitinterface has been made private.

Second, the trust and policy subcommands have been reimplemented using
the recommended structure with specific packages that construct them
with their options.

Finally, the cmd package has been moved to the internal namespace.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2023-05-20 15:17:11 -04:00