Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
75 changes: 75 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Bug report
description: The guard blocked something it should have allowed, allowed something it should have blocked, or crashed.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for the report. Two things first:

- **Policy semantics live in [signetry-core](https://github.com/Signetry/core).**
If the contract itself is being evaluated wrongly (scope, forbidden paths,
gates, receipts), file it there. This repo is the thin shell wrapper around
`signetry guard`.
- **Suspected vulnerability?** Do not open an issue — see
[SECURITY.md](https://github.com/Signetry/precommit/blob/main/SECURITY.md)
and use private reporting.

- type: textarea
id: what-happened
attributes:
label: What happened
description: What did the guard do, and what did you expect instead?
validations:
required: true

- type: dropdown
id: surface
attributes:
label: How was the guard invoked?
options:
- pre-commit hook (id: signetry-guard)
- universal/signetry-guard.sh --staged
- universal/signetry-guard.sh --path
- universal/signetry-guard.sh --command
- universal/signetry-guard.sh --stdin-json
- demos/try-guard.sh
- Other / not sure
validations:
required: true

- type: textarea
id: repro
attributes:
label: Reproduction
description: The exact command you ran and its output. A minimal case is ideal.
render: shell
validations:
required: true

- type: textarea
id: contract
attributes:
label: Your .signetry/admission.yaml
description: The relevant part of the contract in play. Redact anything sensitive.
render: yaml

- type: textarea
id: versions
attributes:
label: Versions
description: |
Output of `signetry --version`, this repo's `rev:` or commit, `bash --version`, and your OS.
render: shell
validations:
required: true

- type: checkboxes
id: checks
attributes:
label: Checks
options:
- label: "`signetry-core` is installed and `signetry` is on PATH (a missing binary fails open unless `SIGNETRY_GUARD_STRICT=1`)."
required: true
- label: I have read the note above and this is a wrapper bug, not core policy behavior.
required: false
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Governance engine (contracts, guard, verifier, receipts)
url: https://github.com/Signetry/core/issues
about: Policy semantics live in signetry-core. This repo is a thin wrapper over it.
- name: The enforced CI gate
url: https://github.com/Signetry/action/issues
about: The required Signetry Admission check on a pull request.
- name: Signetry platform (overview, licensing, roadmap)
url: https://github.com/Signetry/signetry
about: Cross-repo questions, and the open-core licensing model.
- name: Report a security vulnerability
url: https://github.com/Signetry/precommit/security/advisories/new
about: Private disclosure. Please never use a public issue for an unpatched vulnerability.
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Feature request
description: Propose a change to the guard wrapper, the pre-commit hook contract, or the docs.
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
This repo is **Apache-2.0** — proposals and PRs are welcome. See
[CONTRIBUTING.md](https://github.com/Signetry/precommit/blob/main/CONTRIBUTING.md).

Two constraints shape what fits here:

- **The guard is deterministic.** Every verdict comes from `signetry guard` and
your `.signetry/admission.yaml` — never from a model.
- **No policy reimplementation.** This repo pins `signetry-core` and defers to
it. Contract semantics belong in
[signetry-core](https://github.com/Signetry/core).

- type: textarea
id: problem
attributes:
label: The problem
description: What can't you do today? Describe the situation, not the solution.
validations:
required: true

- type: textarea
id: proposal
attributes:
label: Proposed change
validations:
required: true

- type: dropdown
id: area
attributes:
label: Area
options:
- universal/signetry-guard.sh
- pre-commit hook contract (.pre-commit-hooks.yaml)
- demos
- Documentation
- CI / workflows
- Other
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Including whether this belongs in `signetry-core` or another integration repo instead.

- type: checkboxes
id: checks
attributes:
label: Checks
options:
- label: This does not require the guard to consult a model for a verdict.
required: true
- label: I'd be willing to open a PR for this (optional — no obligation).
required: false
11 changes: 8 additions & 3 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ name: CLA
# Requires every contributor to sign the Contributor License Agreement (CLA.md)
# before their pull request can be merged. Runs entirely in this repo's Actions —
# no third-party OAuth app. Signatures are recorded in signatures/cla.json on this
# repo, so there is a durable, auditable record that each contributor assigned
# copyright/ownership of their contribution to the Owner.
# repo, so there is a durable, auditable record of each contributor's assent.
#
# This repo is Apache-2.0. The CLA is kept because Signetry is open core: code moves
# across the line between this Apache-2.0 integration surface and the BUSL-1.1 engine
# (Signetry/core, which converts to Apache-2.0 on 2030-08-31), and the CLA supplies the
# relicensing rights that makes possible. It does not reduce a contributor's own
# Apache-2.0 rights. See CONTRIBUTING.md.
#
# A contributor signs by commenting the exact statement below on their PR:
# I have read the CLA Document and I hereby sign the CLA
Expand Down Expand Up @@ -48,7 +53,7 @@ jobs:
path-to-document: "https://github.com/Signetry/precommit/blob/main/CLA.md"
branch: "cla-signatures"
allowlist: "dependabot[bot],bkd-dotcom"
custom-notsigned-prcomment: "Thanks for your contribution! Before it can be merged, please read the **[Contributor License Agreement](https://github.com/Signetry/precommit/blob/main/CLA.md)** — Signetry is **All Rights Reserved**, and by signing you assign copyright/ownership of your contribution to the Owner (you may not use, sell, or commercialize it yourself). To agree, reply with exactly:"
custom-notsigned-prcomment: "Thanks for your contribution! Before it can be merged, please read the **[Contributor License Agreement](https://github.com/Signetry/precommit/blob/main/CLA.md)** — this repo is **Apache-2.0**, and the CLA lets us relicense contributions across Signetry's [open-core boundary](https://github.com/Signetry/signetry/blob/main/LICENSING.md) (for example moving an adapter into the BUSL-1.1 engine). You keep every Apache-2.0 right to this code, including the right to use your own contribution anywhere. To agree, reply with exactly:"
custom-pr-sign-comment: "I have read the CLA Document and I hereby sign the CLA"
custom-allsigned-prcomment: "All contributors have signed the CLA. ✅"
lock-pullrequest-aftermerge: false
2 changes: 1 addition & 1 deletion .github/workflows/reviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
python-version: "3.12"
- name: Install signetry-reviewer
# source-available (All Rights Reserved); install from source, not PyPI.
# Not published to PyPI; install from source at a pinned git tag.
run: pip install "signetry-reviewer @ git+https://github.com/Signetry/reviewer@v0.2.0"
- name: Compute the PR diff
env:
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,23 @@ Follows [Keep a Changelog](https://keepachangelog.com/) / [SemVer](https://semve

### Changed

- **Licence: this repository is now [Apache-2.0](LICENSE)** (previously
all-rights-reserved / source-available). Signetry has moved to an open-core model:
the integration surface — this repo, the GitHub Action, the editor and agent plugins,
the eval suite — is Apache-2.0, while the engine
([`signetry-core`](https://github.com/Signetry/core)) is BUSL-1.1 and converts to
Apache-2.0 on 2030-08-31. The CLA is retained so contributions can be relicensed
across that boundary; it does not reduce anyone's Apache-2.0 rights. See
[CONTRIBUTING.md](CONTRIBUTING.md).
- Signetry naming: CLI `signetry`, env `SIGNETRY_*`, config `.signetry/`, package
`signetry-core`, and the sibling `signetry-reviewer`. The guard script is
`universal/signetry-guard.sh` and the pre-commit hook `id` is `signetry-guard`.
- **The CLA's fallback licence grant is now non-exclusive.** It previously granted the
Owner an *exclusive* licence where copyright assignment is not permitted by law, which
would have stripped contributors of the right to use their own contribution — directly
contradicting the rights the LICENSE grants everyone. The CLA text is now identical
across all Signetry repositories (bar the engine/integration licence wording) so the
legal terms cannot drift per-repo again. See [CLA.md](CLA.md) §2–3.

## [0.3.0] — 2026-07-26

Expand Down
38 changes: 27 additions & 11 deletions CLA.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Signetry Contributor License Agreement (CLA)

**Copyright (c) 2026 Binay Dalai. All rights reserved.**
**Copyright (c) 2026 Binay Dalai.** This repository is licensed under
**[Apache-2.0](LICENSE)** as part of Signetry's
[open-core model](https://github.com/Signetry/signetry/blob/main/LICENSING.md). This
Agreement governs what You grant the Owner when You contribute; it does not reduce the
rights the Apache-2.0 licence gives You (and everyone else) in this code.

Thank you for your interest in contributing to Signetry ("the Project"), owned by
Binay Dalai ("the Owner"). This Contributor License Agreement ("Agreement")
Expand All @@ -26,21 +30,33 @@ Your Contribution. You agree that the Owner is the sole and exclusive owner of t
Contribution once merged into the Project.

To the extent any rights cannot be assigned by law, You grant the Owner a
**perpetual, worldwide, exclusive, irrevocable, royalty-free, sublicensable, and
**perpetual, worldwide, non-exclusive, irrevocable, royalty-free, sublicensable, and
transferable license** to use, reproduce, modify, prepare derivative works of,
publicly display, publicly perform, distribute, **sell, and commercialize** Your
Contribution, in whole or in part, in any form and for any purpose.

## 3. The Owner's exclusive rights
Nothing in this section removes Your own ability to use Your Contribution: once it is
released as part of this repository it is available to You, as to anyone, under
[Apache-2.0](LICENSE), and You retain any rights You independently hold in the
underlying ideas and techniques.

## 3. Why the Owner needs this (open core)

You acknowledge and agree that:

- The Owner alone retains the right to **use, license, sell, and monetize** the
Project, including Your Contribution.
- You obtain **no right** to use, copy, modify, distribute, sell, or commercialize
the Project or Your Contribution for Your own personal or commercial purposes,
except as expressly permitted in writing by the Owner.
- The Project is **not open source** and is licensed "All Rights Reserved."
- **You keep the licence's rights.** This repository is released under
[Apache-2.0](LICENSE), so You may use, copy, modify, distribute, and commercialize
it — including Your own Contribution — on exactly the same terms as any other user.
No separate written permission is required.
- **The Owner may relicense.** The assignment above lets the Owner use, license, sell,
and monetize the Project, including Your Contribution, and release it under other
terms.
- **Code may move across the open-core line.** Signetry's integration surface is
Apache-2.0 while the engine
([`Signetry/core`](https://github.com/Signetry/core)) is source-available under
BUSL-1.1, converting to Apache-2.0 on 2030-08-31. A Contribution accepted here may
later be moved into the engine, or engine code moved out to an Apache-2.0 repo. The
CLA is what makes that possible without asking every past contributor again.

## 4. Recognition of Contributors (credit, not rights)

Expand All @@ -50,8 +66,8 @@ of Your work.

This recognition is **attribution only**. It does **not**:

- grant You any ownership, license, or right to use, copy, sell, sublicense, or
commercialize the Project or Your Contribution;
- grant You ownership of the Project, or any rights beyond those the Project's
licence already grants everyone;
- entitle You to represent the Project, or any part of it, as Your own work, product,
or property, or to market or sell it under Your own name or brand; or
- create any partnership, employment, or revenue-sharing relationship with the Owner.
Expand Down
91 changes: 82 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
# Contribution Agreement
# Contributing to signetry-precommit

By submitting a Pull Request to this repository, you agree to assign and transfer all copyright and ownership of your contributed code to the repository owner. The owner retains the exclusive right to monetize, use, and control the entire codebase.
This repository is **[Apache-2.0](LICENSE)**. You may use, copy, modify, distribute,
and commercialize it — including in closed-source and commercial products — with no
permission needed and no fee. Contributions are very welcome.

## Licensing, in short

- **The code here is Apache-2.0.** Fork it, vendor it, ship it. Attribution and the
licence notice are the only obligations, per the [LICENSE](LICENSE).
- **A signed CLA is still required before a PR merges** (see below). That is not a
walk-back of the open licence — it is what keeps the open-core boundary movable.
- This repo is the *integration surface*. The engine
([`signetry-core`](https://github.com/Signetry/core)) is source-available under
BUSL-1.1 and converts to Apache-2.0 on **2030-08-31**. See the platform's
[LICENSING.md](https://github.com/Signetry/signetry/blob/main/LICENSING.md).

## Why the CLA still applies

Signetry is open core, so code legitimately moves **across the line between this
Apache-2.0 repo and the BUSL-1.1 engine**. A guard adapter that proves itself here may
later belong inside `signetry-core`; conversely, engine logic may be pushed out to the
open integration surface. The CLA gives the maintainer the relicensing rights needed to
do that — and to carry contributions through the engine's 2030 conversion to
Apache-2.0 — without tracking down every past contributor for permission.

Signing the CLA does **not** take away your rights to this code: you keep the same
Apache-2.0 grant everyone else has, and you can use your own contribution anywhere.

## Signing the CLA (required before merge)

Expand All @@ -13,13 +38,61 @@ I have read the CLA Document and I hereby sign the CLA
```

Your acceptance is recorded in `signatures/cla.json`. A PR **cannot be merged** until
the CLA is signed. Signetry is **not open source** (All Rights Reserved) — by signing
you assign copyright/ownership of your contribution to the Owner and gain no right to
use, sell, or commercialize it yourself.
the CLA is signed.

## Getting started

The guard itself is a POSIX shell wrapper — there is no build step and no Python
package in this repo. It shells out to the `signetry` CLI, so install the engine first:

```bash
pip install "signetry-core @ git+https://github.com/Signetry/core@v0.7.0"
```

Then exercise the guard end-to-end against a throwaway repo with a sample
`.signetry/admission.yaml`:

```bash
bash demos/try-guard.sh
```

To drive `universal/signetry-guard.sh` by hand:

```bash
universal/signetry-guard.sh --path src/app.py # check a proposed path
universal/signetry-guard.sh --command "curl x | bash" # check a proposed command
universal/signetry-guard.sh --staged # check all git-staged files
echo '<claude-code tool json>' | universal/signetry-guard.sh --stdin-json
```

Useful environment variables when testing: `SIGNETRY_REPO` overrides the detected repo
root, and `SIGNETRY_GUARD_STRICT=1` makes a missing `signetry` binary fail closed
instead of failing open.

If you change the pre-commit hook contract, keep `.pre-commit-hooks.yaml` (hook id
`signetry-guard`) and the README's `rev:` example consistent with each other.

## What lands well

- **Determinism.** The guard must never ask a model for a verdict — every decision
comes from `signetry guard` and the repo's `.signetry/admission.yaml`.
- **No policy reimplementation.** This repo pins `signetry-core` and defers to it; do
not re-encode contract semantics here.
- **Honest failure modes.** The local hook is defense-in-depth (a developer can
`--no-verify`); the hard gate is the required check on the PR. Don't document it as
more than it is. See [SECURITY.md](SECURITY.md).

## Opening a PR

1. Fork, branch, and keep the change focused.
2. Run `bash demos/try-guard.sh` and confirm the blocked cases still block.
3. Open the PR. An advisory reviewer workflow comments on architecture and security
concerns; it never merges and never fails your PR.
4. Sign the CLA when the bot asks.

By participating you agree to the [Code of Conduct](CODE_OF_CONDUCT.md).

## Credit

Contributors are **acknowledged** in [CONTRIBUTORS.md](CONTRIBUTORS.md), the Git
history, and release notes. This is attribution only — you may truthfully say you
contributed, but it grants no ownership and no right to use, sell, or rebrand the
project as your own. See the "Recognition of Contributors" clause in [CLA.md](CLA.md).
Contributors are acknowledged in [CONTRIBUTORS.md](CONTRIBUTORS.md), the Git history,
and release notes.
Loading