Commit graph

146 commits

Author SHA1 Message Date
patzielinski
4f3b0cf24b
Merge pull request #841 from yongjae354/list-globalrules
gittuf: add command list-globalrules
2025-03-05 18:57:05 +00:00
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
3e7e688406
gittuf: Update how sync and propagation workflows interact
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-03-05 11:21:29 -05:00
Aditya Sirish A Yelgundhalli
0de2972b48
cmd: Add persistent options for attest
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-02-20 18:13:32 -05:00
Aditya Sirish A Yelgundhalli
3639e23219
*: Add gittuf sync
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-02-20 17:56:07 -05:00
Aditya Sirish A Yelgundhalli
03e363a527
*: Move attest functionality out of dev
This commit moves GitHub-specific attestations out of developer mode. In
addition, it drops the authorize subcommand of dev, which was deprecated in the
last release.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-02-18 09:18:57 -05:00
Aditya Sirish A Yelgundhalli
3d9ec638b3
*: Add propagation flow to certain RSL workflows
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-02-05 15:35:16 -05:00
Aditya Sirish A Yelgundhalli
9c9d735f40
gittuf: Add propagation workflow
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-02-05 14:38:58 -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
Yongjae Chung
09395b18d8 Add remove-principal
Signed-off-by: Yongjae Chung <yongjae354@berkeley.edu>
2025-02-04 13:57:21 -05:00
Aditya Sirish A Yelgundhalli
2923704fa0
gitinterface: Support bare clones
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-02-04 11:18:02 -05:00
Horiodino
3d0be301a4
added Discard to clear the changes currently staged
Signed-off-by: Horiodino <holiodin@gmail.com>

updated Docs

Signed-off-by: Horiodino <holiodin@gmail.com>
2025-02-03 14:56:17 +05:30
Aditya Sirish
749b7df97c
*: Add support for coloring log output
Signed-off-by: Aditya Sirish <aditya@saky.in>
2025-02-01 17:58:11 -05:00
Aditya Sirish
c3148721b9
rsl: Fix gittuf rsl log buffering
This commit fixes how gittuf rsl log loads RSL entries to print.
Earlier, all entries were loaded into memory first and then printed.
This commit switches over to a buffered write approach, meaning the user
starts seeing output right away.

Signed-off-by: Aditya Sirish <aditya@saky.in>
Co-authored-by: Hao Tran <haoanhtran7@gmail.com>
2025-02-01 17:51:37 -05:00
Aditya Sirish A Yelgundhalli
16d9e1d9ce
*: Move reference authorizations out of dev mode
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-01-31 13:45:23 -05:00
Aditya Sirish A Yelgundhalli
82dfce994c
gittuf,policy: Add VerifyMergeableForCommit
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-01-28 17:53:09 -05:00
Aditya Sirish A Yelgundhalli
f66f5d38c5
docs: Add global constraints GAP
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-01-24 16:31:39 -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 A Yelgundhalli
e8d9fd8801
docs: Move extensions to GAPs
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-01-22 11:21:38 -05:00
Aditya Sirish A Yelgundhalli
03d57380a6
docs: Update GAP process
This commit fixes a typo and provides examples where a GAP's feature additions
may be removed from the implementation at a future date.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-01-20 16:40:46 -05:00
Aditya Sirish A Yelgundhalli
984d838cbf
docs: Add GAP sponsor responsibilities
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-01-20 15:55:06 -05:00
Aditya Sirish A Yelgundhalli
cfa97967d5
docs: Update extensions to GAPs in design doc
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-01-20 13:48:13 -05:00
Aditya Sirish A Yelgundhalli
4beb91df1b
docs: Reduce process overhead for GAPs
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-01-20 12:05:04 -05:00
Aditya Sirish A Yelgundhalli
50bf762e52
docs: Add the GAPs process as GAP-1
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2025-01-17 13:38:13 -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
Jamal Cao
7e0a338be5 tui: added a terminal user interface (TUI) for managing gittuf policy
Signed-off-by: Jamal Cao <jamaltheodds@gmail.com>
2025-01-15 11:32:09 -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
Aditya Sirish
90a4d1a806
gittuf,cache,policy,cmd: Use persistent cache
This commit adds support for persistent cache searching as well as
explicit populating.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2025-01-08 12:42:13 -05:00
Aditya Sirish
d305d7fa89
Merge pull request #702 from gittuf/design-doc-improvements
docs: Major reworking of design document
2024-12-27 18:31:40 -05:00
Aditya Sirish
a19980219e
docs: Major reworking of design document
This cleans up various parts of the design document, including updating
it to reflect some changes. The document now also points to the accepted
NDSS paper.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-12-24 17:00:20 -05:00
Aditya Sirish
cdacf9cf1a
*: Add control for RSL duplicate check
The RSL entry creation flow checks to see if the latest entry for the
reference being pushed has the same target ID as the proposed new entry.
This check should be optional, depending on how the entry is created.
When created using the "gittuf rsl record" command, the check should be
performed by default. But when created using the git-remote-gittuf
transport, the check is superfluous: the push is happening and an extra
entry recording the push happened is better. This also speeds up the RSL
entry creation for a new branch via the transport, as looking for an
existing RSL entry for the branch in question is expensive (the entire
RSL history must be checked).

Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-12-18 11:21:00 -05:00
Pat Zielinski
1eb2b50e6e
Prepare v0.8.0
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2024-12-11 11:01:12 -05:00
Aditya Sirish A Yelgundhalli
a601aee55d
*: Various policy fixes
1. VerifyMergeable was incorrectly returning an error when no verifiers were
found (for an unprotected base branch).

2. Policy's searcher interface was also returning the wrong error when the
latest policy or attestation entry was not found.

3. A verify-mergeable command has been added to simplify debugging.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-12-06 16:08:32 -05:00
Aditya Sirish A Yelgundhalli
4ccc102f8e
*: Use person associatedIdentities to verify code review tool approvals
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-11-07 17:21:19 -05:00
Aditya Sirish A Yelgundhalli
9c08c47035
*: Expose persons in CLI
This commit allows for using persons in the CLI. In doing so, it updates the
expected flow where add-rule no longer also adds the principals passed in.
Instead, keys / persons must be added explicitly first, and add-rule will fail
if the principal is not found.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-11-07 15:11:52 -05:00
Aditya Sirish A Yelgundhalli
8c49dfea3a
policy, cmd: Add list-principals sub command
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-11-07 12:48:06 -05:00
Pat Zielinski
bcc6d1f594 *: Set minimum go version to 1.23.2
Signed-off-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
2024-10-24 12:00:30 -04:00
Aditya Sirish A Yelgundhalli
0b9fffd30c
docs: Improvements to the design document
This commit moves some WIP text to the extensions directory.

Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
2024-10-21 09:08:45 -04:00
patzielinski
f7cc454e45
Merge pull request #523 from Yasho-Bapat/improve-documentation
improving windows installation instructions
2024-10-01 17:30:39 +00:00
yashobapat
8c5540ef06 Add winget + v0.6.0 + ghactions workflow win get-started tests + drop "on windows"
Signed-off-by: yashobapat <f20210006@goa.bits-pilani.ac.in>
2024-10-01 12:10:14 -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
yashobapat
2caf1dae48 get-started tests on Windows
Signed-off-by: yashobapat <f20210006@goa.bits-pilani.ac.in>
2024-10-01 11:09:32 -04:00
yashobapat
e07dcddd6d improve windows installation instructions
Signed-off-by: yashobapat <f20210006@goa.bits-pilani.ac.in>
2024-10-01 11:09:32 -04:00
Aditya Sirish
999b42c677
transport: Simplify flow and switch to APIs
This commit reorganizes the remote helpers to have an easier to follow
flow of execution. It also moves the transport-related documentation to
the corresponding package for better discoverability.

Additionally, some invocations of exec.Command have been replaced by
APIs.

Finally, the logic for when to update local gittuf refs has been updated
to first check if the local is ahead of the remote. This uses the newly
introduced reconciliation function in repository.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-09-26 13:55:39 -04:00
Aditya Sirish
fbf9720b29
Merge pull request #546 from gittuf/no-transport-check
Add reconciliation workflow to update local RSL against remote RSL
2024-09-25 14:26:34 -04:00
Aditya Sirish
929e0d162d
*: Automatically reconcile local RSL with remote updates
This commit adds ReconcileLocalRSLWithRemote, which checks the local RSL
against the specified remote and reconciles the local RSL if needed. If
the local RSL doesn't exist or is strictly behind the remote RSL, then
the local RSL is updated to match the remote RSL. If the local RSL is
ahead of the remote RSL, nothing is updated. Finally, if the local and
remote RSLs have diverged, then the local only RSL entries are reapplied
over the latest entries in the remote if the local only RSL entries and
remote only entries are for different Git references.

Signed-off-by: Aditya Sirish <aditya@saky.in>
2024-09-25 14:02:59 -04:00