codeimprint 0.5.0a11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- codeimprint-0.5.0a11/.gitignore +14 -0
- codeimprint-0.5.0a11/CHANGELOG.md +266 -0
- codeimprint-0.5.0a11/LICENSE +177 -0
- codeimprint-0.5.0a11/NOTICE +11 -0
- codeimprint-0.5.0a11/PKG-INFO +92 -0
- codeimprint-0.5.0a11/README.pypi.md +59 -0
- codeimprint-0.5.0a11/pyproject.toml +65 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/__init__.py +7 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/__main__.py +5 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/api.py +315 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/chainseal.py +175 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/cli.py +2128 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/config.py +181 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/gitrepo.py +148 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/imprint_file.py +128 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/linecount.py +340 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/ownership.py +341 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/project.py +129 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/receipt.py +679 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/records.py +59 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/timestamp.py +187 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/transparency.py +71 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/trust.py +190 -0
- codeimprint-0.5.0a11/src/codeimprint_cli/tsa_roots.py +137 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.5.0a11 — Project names, `imprint github link`, identity offer [CIM-BE-19-v1]
|
|
4
|
+
|
|
5
|
+
- `imprint init` names the project `owner/repo` from the `origin` remote, else the folder's
|
|
6
|
+
name (`--name` to choose); with an existing project, `--name` renames it.
|
|
7
|
+
- `imprint project rename <name> [--private]`: a new display name, signed by your developer key.
|
|
8
|
+
- `imprint github link`: for a repository sealed by the CodeImprint GitHub App (engine
|
|
9
|
+
0.7.0a16). Upgrades the App's project to your own key (the App's key adds yours; your key
|
|
10
|
+
signs the `INT1` authorisation), or attaches your existing project (your key adds the App's
|
|
11
|
+
key). Checks that the authorisation names your key and project before signing, verifies the
|
|
12
|
+
record's receipt, saves it in `.imprint/`, and records the project in `.imprint/config.json`
|
|
13
|
+
when there was none.
|
|
14
|
+
- Onboarding: `imprint init` (and the first `imprint seal` on a server) offers to bind the
|
|
15
|
+
developer key's identity when it has none (`imprint identity bind --level email`); it asks
|
|
16
|
+
(y/N), never binds silently, and in GitHub Actions or without a terminal only prints the hint.
|
|
17
|
+
- `INT1` records are recognised by `imprint verify` (record type and ID prefix).
|
|
18
|
+
|
|
19
|
+
Packaging [CIM-BE-20-v1]: the client's first PyPI release.
|
|
20
|
+
|
|
21
|
+
- The distribution is now `codeimprint` (`pip install --pre codeimprint`); `code-imprint` is
|
|
22
|
+
a separate, code-free alias that installs `codeimprint` at the same version. The import
|
|
23
|
+
package (`codeimprint_cli`) and the command (`imprint`) are unchanged.
|
|
24
|
+
`imprint --version` prints `codeimprint <version>`; the User-Agent is `codeimprint/<version>`.
|
|
25
|
+
- `.github/workflows/publish.yml`: on a tag `v*`, the thin-client check and the tests, then
|
|
26
|
+
both packages are built, checked (`twine check`, `scripts/check_release.py`: the tag matches
|
|
27
|
+
the versions, and only the client package and its notices ship) and published with Trusted
|
|
28
|
+
Publishing, `codeimprint` first (environment `pypi`), then the alias (`pypi-alias`).
|
|
29
|
+
- The sdist holds only the package, `README.pypi.md`, `CHANGELOG.md`, `LICENSE` and `NOTICE`.
|
|
30
|
+
- An existing install from a folder under the old name must be removed first:
|
|
31
|
+
`pip uninstall code-imprint`, then `pip install codeimprint`.
|
|
32
|
+
- No GitHub Action reference any more: the workflow `imprint init` writes installs the client
|
|
33
|
+
with `pip install --pre codeimprint` and runs `imprint seal` / `imprint check` directly, with
|
|
34
|
+
`CODEIMPRINT_URL`, `CODEIMPRINT_TOKEN` and `CODEIMPRINT_DEVELOPER_KEY` from secrets (a
|
|
35
|
+
`CODEIMPRINT_URL` repository variable still works). Without a URL (pull requests from forks)
|
|
36
|
+
the jobs are skipped with a notice. Actions `checkout`, `setup-python` and `upload-artifact`
|
|
37
|
+
at v7. The README's pre-commit example is a local hook. `imprint init --force` rewrites an
|
|
38
|
+
existing workflow.
|
|
39
|
+
|
|
40
|
+
## 0.5.0a10 — Line count per seal [CIM-BE-17-v1]
|
|
41
|
+
|
|
42
|
+
- `imprint seal` counts the project's non-blank lines (docs/line-count.md, rules `lines/1`):
|
|
43
|
+
the files Git tracks at the sealed commit, without binary, vendored and generated files,
|
|
44
|
+
with `linguist-vendored` / `linguist-generated` from `.gitattributes` (`git check-attr` at
|
|
45
|
+
the commit). Outside Git (or `--zip`): the folder's files, `.gitignore` applied. The count
|
|
46
|
+
and a per-language breakdown are sent with the seal and printed:
|
|
47
|
+
`Lines 123,456 (Python 80%, TypeScript 20%)`.
|
|
48
|
+
- The engine (0.7.0a15) keeps the count in the Imprint's public header, so the digest you
|
|
49
|
+
sign covers it; the client refuses to treat a seal as done if the sealed Imprint carries a
|
|
50
|
+
different count. Older engines ignore it.
|
|
51
|
+
- Fast on large repositories: one `git check-attr` and one streamed `git cat-file --batch`
|
|
52
|
+
per count, path rules before any content is read, and a per-blob cache in the Git
|
|
53
|
+
directory (`codeimprint-lines.json`; blobs are content-addressed, so it never goes stale).
|
|
54
|
+
- Production engines now require an account for sealing (`imprint login`, or an API token in
|
|
55
|
+
automated builds); public verification is unchanged.
|
|
56
|
+
|
|
57
|
+
## 0.5.0a9 — Hub links from the server, verify default, rust badge [CIM-BE-14-v1]
|
|
58
|
+
|
|
59
|
+
- The verify link and README badge use the hub the server names (`public_url` in its keys
|
|
60
|
+
file, engine 0.7.0a11). Order: `imprint seal --hub-url`, then `CODEIMPRINT_HUB_URL`, then the
|
|
61
|
+
server's hub, refreshed on every `imprint login` and every seal and cached per server URL in
|
|
62
|
+
the user config (`hubs`). With none known, no link or badge is printed, only
|
|
63
|
+
`imprint verify <file>`; never a localhost guess. A localhost hub is kept only from a
|
|
64
|
+
localhost server, and any other hub only over HTTPS.
|
|
65
|
+
- **Changed:** `CODEIMPRINT_PUBLIC_URL`, the saved `public_url` and the `https://mudrika.io`
|
|
66
|
+
default are no longer used; `imprint login --public-url` is accepted but ignored, with a
|
|
67
|
+
warning. The terms hint names the hub's account page when the hub is known.
|
|
68
|
+
- `imprint verify` with no target checks `.imprint/baseline.imprint` in the current folder;
|
|
69
|
+
without one, the usual usage error.
|
|
70
|
+
- The badge is rust, `B23C0C`.
|
|
71
|
+
- No change to sealing, receipts, the log or verification.
|
|
72
|
+
|
|
73
|
+
## 0.5.0a8 — Servers behind Cloudflare Access [CIM-BE-13-v1]
|
|
74
|
+
|
|
75
|
+
- A Cloudflare Access service token (`CODEIMPRINT_CF_ACCESS_CLIENT_ID` and
|
|
76
|
+
`CODEIMPRINT_CF_ACCESS_CLIENT_SECRET`, or `imprint login --cf-access`, saved in the user-only
|
|
77
|
+
config file) is sent as `CF-Access-Client-Id` / `CF-Access-Client-Secret`, only to the
|
|
78
|
+
configured server's host and only over HTTPS (or HTTP to this machine).
|
|
79
|
+
- The client no longer follows redirects (one would have carried the token and the Access
|
|
80
|
+
secret to wherever it pointed); Access's login redirect and its 401/403 page now give a clear
|
|
81
|
+
message.
|
|
82
|
+
|
|
83
|
+
## 0.5.0a7 — Terms acceptance [CIM-BE-10-v1]
|
|
84
|
+
|
|
85
|
+
- Commands that create records (`identity bind`, `claim create | add-key | retire-key`,
|
|
86
|
+
`assign`, `contributor`, `org` except `show` and `end`) send them with your signed-in session
|
|
87
|
+
(`imprint login`), as engine 0.7.0a8 requires. When the server answers that the terms are
|
|
88
|
+
not accepted yet, the client says so and names the account page (`<public URL>/account`)
|
|
89
|
+
to accept them; `imprint login` says so too.
|
|
90
|
+
|
|
91
|
+
## 0.5.0a6 — Organisation and contributor commands [CIM-BE-9-v6]
|
|
92
|
+
|
|
93
|
+
- `imprint org create | show | domain | verify | disclose | join | approve | end`: create an
|
|
94
|
+
organisation (signed in), verify a domain by DNS TXT record (the challenge is kept on your
|
|
95
|
+
machine between `domain` and `verify`), disclose it, join (by admin approval, with a file
|
|
96
|
+
the admin completes with `approve`, or at once with a company-domain sign-in) and end a
|
|
97
|
+
membership. Statements the server prepares are signed only when they match their document.
|
|
98
|
+
- `imprint contributor`: a contributor record signed by the contributor and a project key,
|
|
99
|
+
optionally with an agreement (committed by salted hash) that assigns to a claim; one side
|
|
100
|
+
writes a file, the other completes it with `--complete`.
|
|
101
|
+
|
|
102
|
+
## 0.5.0a5 — "Already sealed" answers [CIM-BE-8-v5]
|
|
103
|
+
|
|
104
|
+
- Reads engine 0.7.0a5's Git plan answer for a tree already sealed (`already_sealed: true`
|
|
105
|
+
with the seal's `id`) as well as earlier engines' (`already_sealed` = the ID), so
|
|
106
|
+
`imprint seal` names the existing seal either way.
|
|
107
|
+
|
|
108
|
+
## 0.5.0a4 — Ownership claims [CIM-BE-9-v5]
|
|
109
|
+
|
|
110
|
+
- `imprint claim create` (person or `--org`; `--basis`, `--effective-at`, `--share`,
|
|
111
|
+
`--jurisdiction`, `--document KIND=FILE` sends only a salted hash and keeps the salt in
|
|
112
|
+
`.imprint/claims/`, `--also-sign KEYFILE` for each other listed key), `claim show`,
|
|
113
|
+
`claim withdraw`, `claim add-key` and `claim retire-key`. Each asks first (`--yes` to skip)
|
|
114
|
+
and states that the claimant warrants the claim is truthful.
|
|
115
|
+
- `imprint assign CLM1-… --from TIME [--until TIME]`: an assignment signed by both sides; one
|
|
116
|
+
side writes a file, the other completes it with `--complete FILE`.
|
|
117
|
+
- `imprint ownership show`: fetches the project's ownership listing and verifies it in full:
|
|
118
|
+
every record's receipt, consent of every listed key, the claimant's identity level and
|
|
119
|
+
window, an organisation's disclosure, membership windows from their records, withdrawals,
|
|
120
|
+
and **each seal's coverage recomputed** from the seals' own receipts. Works with engine
|
|
121
|
+
0.7.0a4.
|
|
122
|
+
|
|
123
|
+
## 0.5.0a3 — Organisation records [CI-BE-9-v4]
|
|
124
|
+
|
|
125
|
+
- `imprint verify` checks membership records (`MBR1`): the member key signed; an
|
|
126
|
+
admin-approved membership also carries the organisation admin's signature, a domain-proven one
|
|
127
|
+
does not. Disclosure records (`DSC1`) and domain-level identity records verify like other
|
|
128
|
+
records. Works with engine 0.7.0a3.
|
|
129
|
+
|
|
130
|
+
## 0.5.0a2 — Sign-in and verified identity [CI-BE-9-v3]
|
|
131
|
+
|
|
132
|
+
- `imprint login` now **signs in** (engine 0.7.0a2): it opens the browser (or prints the link
|
|
133
|
+
with `--no-browser`; `--provider github|gitlab|google|microsoft|email`, `--email`), shows a
|
|
134
|
+
code the browser must match, and saves a short-lived session. The API-token flow stays as
|
|
135
|
+
`--api-token` or `--token-stdin` (CI).
|
|
136
|
+
- `imprint identity bind --level email|vcs` binds your developer key to the sign-in (the key
|
|
137
|
+
signs the server's challenge) and saves the identity record's receipt; `identity show`;
|
|
138
|
+
`identity revoke [IDT1-…] [--reason key-compromised --compromised-since TIME]`.
|
|
139
|
+
- `imprint verify` checks identity records (the key's signature over its request, expiry) and
|
|
140
|
+
revocations; online, a revoked or expired identity fails, and a seal signed by a key at or
|
|
141
|
+
after its reported compromise is flagged.
|
|
142
|
+
|
|
143
|
+
## 0.5.0a1 — Ownership records: verification [CI-BE-9-v2]
|
|
144
|
+
|
|
145
|
+
- `imprint verify` checks ownership records (receipt format 4, engine 0.7.0a1): the record
|
|
146
|
+
document against its digest and typed ID (`IDT1-…`, `CLM1-…`, …), the attestation's kind,
|
|
147
|
+
project, parents and signers, every owner signature and the roles the type requires, then
|
|
148
|
+
the log and timestamps as for seals. Online, records are fetched from
|
|
149
|
+
`/api/v1/public/records/{id}`.
|
|
150
|
+
- Typed IDs check the prefix with the body, so a mistyped prefix is caught.
|
|
151
|
+
|
|
152
|
+
## 0.4.0a3 — Sealed zips and release-tag consistency [CI-BE-8-v4]
|
|
153
|
+
|
|
154
|
+
- Git seals never send `.imprint/` paths; committing a seal and its receipt answers
|
|
155
|
+
"already sealed" (engine 0.6.0a3).
|
|
156
|
+
- A release of a tree not sealed before shows its tag (private by default, `--public-tag`),
|
|
157
|
+
and `imprint verify` checks that the Imprint's `release` field matches the attested one.
|
|
158
|
+
|
|
159
|
+
## 0.4.0a2 — Release records [CI-BE-8-v3]
|
|
160
|
+
|
|
161
|
+
- `imprint seal --kind release` on a commit whose tree is already sealed now adds a signed,
|
|
162
|
+
logged and timestamped release record (`REL1-…`) labelling that seal, instead of only
|
|
163
|
+
answering "already sealed". The tag comes from the commit or `--tag NAME`; it stays private
|
|
164
|
+
(a salted commitment is public) unless `--public-tag`. The receipt is saved as
|
|
165
|
+
`.imprint/<REL1 ID>.receipt.json`; the same tag again answers "already released".
|
|
166
|
+
- `imprint verify` checks release records: the document against its digest, `REL1` ID and
|
|
167
|
+
chain, and online that the released seal has the named digest and came earlier.
|
|
168
|
+
- GitHub Action: `public-tag` input.
|
|
169
|
+
|
|
170
|
+
## 0.4.0a1 — Git-aware sealing [CI-BE-8-v2]
|
|
171
|
+
|
|
172
|
+
- `imprint init` creates the project and its **genesis seal** (needs a server: `imprint login`
|
|
173
|
+
first, or `--url`; `--no-project` skips it), stores `project_id` in `.imprint/config.json`
|
|
174
|
+
and saves `.imprint/genesis.imprint` and its receipt.
|
|
175
|
+
- `imprint seal` in a Git repository uses the **incremental protocol**: it sends the commit's
|
|
176
|
+
file list, uploads only the files the server asks for, and signs the prepared seal into the
|
|
177
|
+
project's chain. `--kind commit|push|release`, `--rev`, `--all-commits RANGE`, `--zip`.
|
|
178
|
+
Outside Git, zip seals join the project's chain too.
|
|
179
|
+
- `imprint hook install --on commit|push` and `imprint hook run`: hooks never block; offline,
|
|
180
|
+
seals queue in `.git/codeimprint/queue` and are flushed on the next run.
|
|
181
|
+
- `imprint chain` (the server's chain with this clone's commits) and `imprint export <ID>`
|
|
182
|
+
(the full Imprint of a Git seal, checked against the seal).
|
|
183
|
+
- `imprint verify` checks receipt format 3: attestation v2 and log entry v2, the developer's
|
|
184
|
+
chain signature (it counts as the developer signature), the manifest root, and online that
|
|
185
|
+
the signer was a project key at the seal's time.
|
|
186
|
+
- GitHub Action: `kind` input; the workflow seals pushes as `push` and tags as `release`.
|
|
187
|
+
- The test image installs `git`.
|
|
188
|
+
|
|
189
|
+
## Unreleased [CI-BE-7-v1]
|
|
190
|
+
|
|
191
|
+
- Public-URL setting for badge and verify links: `CODEIMPRINT_PUBLIC_URL`, or
|
|
192
|
+
`imprint login --public-url URL` (saved in the user config). Default `https://mudrika.io`;
|
|
193
|
+
launch value `https://app.codeimprint.ai`.
|
|
194
|
+
- The log origin is no longer fixed in the client: a checkpoint must carry its receipt's
|
|
195
|
+
origin, and with `--online` the live log must still have it. Servers can now run under
|
|
196
|
+
another origin (for launch, `codeimprint.ai/log/v1`).
|
|
197
|
+
|
|
198
|
+
## 0.3.0a1 — timestamps from two independent TSAs [CI-BE-5-v2]
|
|
199
|
+
|
|
200
|
+
- **Pinned TSA roots.** A timestamp token now counts only if its signer certificate has the
|
|
201
|
+
time-stamping key usage marked critical, was valid at `genTime`, and chains through CA
|
|
202
|
+
certificates valid at that time to a pinned root: DigiCert Trusted Root G4, USERTrust RSA
|
|
203
|
+
(Sectigo) or GlobalSign Root R6 (spare), from the Mozilla root store. Before, any
|
|
204
|
+
certificate carried in the token was accepted, including a self-signed one. Other TSAs
|
|
205
|
+
fail unless trusted with `--tsa-certs FILE` (on `verify` and `seal`).
|
|
206
|
+
- **Receipt format 2.** Several tokens per seal and per checkpoint, one entry per TSA (ok,
|
|
207
|
+
unavailable or invalid), a server-signed record of every answer, and the TSA list
|
|
208
|
+
committed in the signed attestation and checkpoint: a removed, swapped or relabelled
|
|
209
|
+
token fails. Format 1 receipts still verify.
|
|
210
|
+
- `imprint verify` prints one line per TSA for the seal and the checkpoint. Any token that
|
|
211
|
+
is present but invalid fails; valid tokens more than an hour apart fail; any token earlier
|
|
212
|
+
than the attested time fails; an unavailable TSA is a warning.
|
|
213
|
+
- `imprint seal` prints the timestamp lines and the receipt's warnings, and in GitHub Actions
|
|
214
|
+
adds them to the run's summary page (no other change to the Action).
|
|
215
|
+
- Fixed: RFC 3161 tokens from real TSAs were not parsed (the TSTInfo content type was not
|
|
216
|
+
registered); only the test TSA's tokens were.
|
|
217
|
+
- `docs/how-sealing-works.md`: why two TSAs, the pinned roots and their fingerprints, the
|
|
218
|
+
extended threat model. Real DigiCert, Sectigo and GlobalSign tokens are kept as offline
|
|
219
|
+
test fixtures.
|
|
220
|
+
|
|
221
|
+
## 0.2.0a1 — tamper-evident seals [CI-BE-5-v1]
|
|
222
|
+
|
|
223
|
+
- `imprint init` creates an Ed25519 **developer key** in the user config folder (0600; never
|
|
224
|
+
uploaded, never in the repository) and records its fingerprint in `.imprint/config.json`.
|
|
225
|
+
`--no-key` skips it. The workflow it writes now also seals on pushes to `main` and on tags.
|
|
226
|
+
- `imprint seal` checks the server's attestation, log entry, inclusion proof and checkpoint
|
|
227
|
+
against its published keys (trusted on first use, then only ever extended), signs the
|
|
228
|
+
digest locally, uploads the signature, and saves `.imprint/baseline.receipt.json` and
|
|
229
|
+
`.imprint/server-keys.json` next to the Imprint. It prints the log entry, timestamp status,
|
|
230
|
+
badge and `https://mudrika.io/i/<ID>`. In CI every failure after the upload is a warning.
|
|
231
|
+
- `imprint verify <file|receipt|ID>` checks digest, attestation, developer signature, log
|
|
232
|
+
inclusion, RFC 3161 timestamp and time order offline, one `PASS`/`WARN`/`FAIL` line each;
|
|
233
|
+
`--online` adds log consistency, entry order and the public record; `--keys FILE` pins
|
|
234
|
+
server keys; `--strict` fails on warnings. A file without a receipt is checked as before.
|
|
235
|
+
- GitHub Action: `mode: seal` with `developer-key`, uploading the seal, receipt and keys as
|
|
236
|
+
a build artifact.
|
|
237
|
+
- New `docs/how-sealing-works.md`: guarantees, threat model, limits, verification steps.
|
|
238
|
+
- New dependency: `asn1crypto` (RFC 3161 tokens).
|
|
239
|
+
|
|
240
|
+
## Unreleased [CI-BE-4-v2]
|
|
241
|
+
|
|
242
|
+
- `docs/imprint-format.md`: the opaque layout is used by `imp1-p2` and `imp1-p3` (spec 0.2 or
|
|
243
|
+
0.3); the header fields are unchanged. Integration tests accept either.
|
|
244
|
+
|
|
245
|
+
## Unreleased [CI-BE-4-v1]
|
|
246
|
+
|
|
247
|
+
- `docs/imprint-format.md` describes the opaque `imp1-p2` layout (public header + encrypted
|
|
248
|
+
payload, digest and signature over both) and keeps `imp1-p1` as the older layout.
|
|
249
|
+
`imprint verify` needs no change: it already verifies whatever the body holds.
|
|
250
|
+
- Verify tests use `imp1-p2` Imprints made by the engine, signed and unsigned, alongside the
|
|
251
|
+
older `imp1-p1` ones.
|
|
252
|
+
- The client has its own public example projects (`tests/fixtures/projects`); integration
|
|
253
|
+
tests and the compose file no longer use the engine's examples.
|
|
254
|
+
|
|
255
|
+
## 0.1.0a1 — unreleased
|
|
256
|
+
|
|
257
|
+
First release of the public CodeImprint client [CI-BE-3-v2].
|
|
258
|
+
|
|
259
|
+
- `imprint login`, `init`, `seal`, `check` and `verify` (offline digest and Ed25519 check).
|
|
260
|
+
- Uploads only Python sources, respecting `.gitignore` (root and nested) and
|
|
261
|
+
`.imprint/config.json` excludes, and shows what will be sent before sending it.
|
|
262
|
+
- `check` degrades to a warning on network, auth, rate-limit and server problems; only a
|
|
263
|
+
score at or above `--fail-above` fails.
|
|
264
|
+
- Composite GitHub Action and pre-commit hook (pre-push).
|
|
265
|
+
- `docs/imprint-format.md`: the public `.imprint` format and verification rules.
|
|
266
|
+
- Thin-client guard (`scripts/check_thin_client.py`) in CI and tests.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
https://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
CodeImprint client by Mudrika
|
|
2
|
+
Copyright 2026 Mudrika
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
5
|
+
|
|
6
|
+
This client calls a CodeImprint server. It contains no part of the IMP-1 engine, which is
|
|
7
|
+
proprietary to Mudrika and is not covered by this licence.
|
|
8
|
+
|
|
9
|
+
"Mudrika" and "CodeImprint" are trademarks of their owner. The Apache License does not grant
|
|
10
|
+
permission to use these names except as required for reasonable and customary use in
|
|
11
|
+
describing the origin of the work.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: codeimprint
|
|
3
|
+
Version: 0.5.0a11
|
|
4
|
+
Summary: CodeImprint by Mudrika: seal your code with a CodeImprint server (tamper-evident, logged and timestamped) and verify seals offline.
|
|
5
|
+
Project-URL: Homepage, https://codeimprint.ai
|
|
6
|
+
Project-URL: Hub, https://app.codeimprint.ai
|
|
7
|
+
Author: Mudrika
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: NOTICE
|
|
11
|
+
Keywords: code provenance,code sealing,github actions,software birthmark,transparency log
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Security
|
|
23
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
24
|
+
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Requires-Dist: asn1crypto>=1.5
|
|
27
|
+
Requires-Dist: cryptography>=42
|
|
28
|
+
Requires-Dist: pathspec>=0.12
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
31
|
+
Requires-Dist: ruff==0.17.2; extra == 'dev'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# CodeImprint by Mudrika — command-line client
|
|
35
|
+
|
|
36
|
+
**Code provenance that survives AI.** CodeImprint seals your code: every seal is an
|
|
37
|
+
**Imprint**, a compact signature of the code that is tamper-evident, recorded in a public
|
|
38
|
+
transparency log and timestamped, so it cannot be altered or backdated without detection. An
|
|
39
|
+
Imprint still matches when the code is renamed, reformatted, reordered or rewritten, and it
|
|
40
|
+
does not contain your source.
|
|
41
|
+
|
|
42
|
+
This package is the command-line client, `imprint`. It talks to a CodeImprint server, which
|
|
43
|
+
does the analysis; the client sends your files, checks what the server returns and verifies
|
|
44
|
+
seals offline. Learn more at [codeimprint.ai](https://codeimprint.ai).
|
|
45
|
+
|
|
46
|
+
> **Pre-release (alpha).** Install with `--pre`. Python 3.10 or newer.
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install --pre codeimprint
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
(`pip install --pre code-imprint` installs the same package.)
|
|
55
|
+
|
|
56
|
+
## Get started
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
imprint login --url https://api.codeimprint.ai # sign in (browser or e-mail link)
|
|
60
|
+
imprint init # your developer key, the project and its first seal
|
|
61
|
+
imprint seal . # seal the current commit
|
|
62
|
+
imprint verify # check the seal offline
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- **`imprint login`** saves the server and your sign-in in your user config folder, readable
|
|
66
|
+
by you only. In GitHub Actions, use an API token: `imprint login --token-stdin`, or the
|
|
67
|
+
`CODEIMPRINT_URL` and `CODEIMPRINT_TOKEN` environment variables.
|
|
68
|
+
- **`imprint init`** creates your Ed25519 developer key in the user config folder (it is
|
|
69
|
+
never uploaded and never written to the repository), writes `.imprint/config.json` and a
|
|
70
|
+
GitHub Actions workflow, and creates the project, named `owner/repo` from the `origin`
|
|
71
|
+
remote.
|
|
72
|
+
- **`imprint seal .`** shows what it is about to send and asks first (`--yes` skips the
|
|
73
|
+
question). Only the files that changed since the last seal are sent. It checks the server's
|
|
74
|
+
signature and log proof, signs the result with your developer key, and prints the Imprint
|
|
75
|
+
ID and a link to its public page on [app.codeimprint.ai](https://app.codeimprint.ai).
|
|
76
|
+
- **`imprint verify`** checks a seal offline: digest, server attestation, your signature, log
|
|
77
|
+
inclusion and the RFC 3161 timestamp. `--online` also checks the live log.
|
|
78
|
+
|
|
79
|
+
Other commands: `imprint check` (compare a project with a protected Imprint; similarity is
|
|
80
|
+
evidence, not proof), `imprint chain`, `imprint hook install`, `imprint identity`,
|
|
81
|
+
`imprint claim`, `imprint github link` and more. Run `imprint --help`.
|
|
82
|
+
|
|
83
|
+
## What leaves your machine
|
|
84
|
+
|
|
85
|
+
`imprint seal` and `imprint check` upload the project's files to the CodeImprint server you
|
|
86
|
+
signed in to, which fingerprints them and deletes them at once; only the Imprint is kept.
|
|
87
|
+
Your developer key never leaves your machine: only its public half is sent.
|
|
88
|
+
|
|
89
|
+
## Licence
|
|
90
|
+
|
|
91
|
+
Apache-2.0. The client contains no part of the CodeImprint engine, which runs on the server.
|
|
92
|
+
"Mudrika" and "CodeImprint" are trademarks of their owner (see NOTICE).
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# CodeImprint by Mudrika — command-line client
|
|
2
|
+
|
|
3
|
+
**Code provenance that survives AI.** CodeImprint seals your code: every seal is an
|
|
4
|
+
**Imprint**, a compact signature of the code that is tamper-evident, recorded in a public
|
|
5
|
+
transparency log and timestamped, so it cannot be altered or backdated without detection. An
|
|
6
|
+
Imprint still matches when the code is renamed, reformatted, reordered or rewritten, and it
|
|
7
|
+
does not contain your source.
|
|
8
|
+
|
|
9
|
+
This package is the command-line client, `imprint`. It talks to a CodeImprint server, which
|
|
10
|
+
does the analysis; the client sends your files, checks what the server returns and verifies
|
|
11
|
+
seals offline. Learn more at [codeimprint.ai](https://codeimprint.ai).
|
|
12
|
+
|
|
13
|
+
> **Pre-release (alpha).** Install with `--pre`. Python 3.10 or newer.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install --pre codeimprint
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
(`pip install --pre code-imprint` installs the same package.)
|
|
22
|
+
|
|
23
|
+
## Get started
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
imprint login --url https://api.codeimprint.ai # sign in (browser or e-mail link)
|
|
27
|
+
imprint init # your developer key, the project and its first seal
|
|
28
|
+
imprint seal . # seal the current commit
|
|
29
|
+
imprint verify # check the seal offline
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- **`imprint login`** saves the server and your sign-in in your user config folder, readable
|
|
33
|
+
by you only. In GitHub Actions, use an API token: `imprint login --token-stdin`, or the
|
|
34
|
+
`CODEIMPRINT_URL` and `CODEIMPRINT_TOKEN` environment variables.
|
|
35
|
+
- **`imprint init`** creates your Ed25519 developer key in the user config folder (it is
|
|
36
|
+
never uploaded and never written to the repository), writes `.imprint/config.json` and a
|
|
37
|
+
GitHub Actions workflow, and creates the project, named `owner/repo` from the `origin`
|
|
38
|
+
remote.
|
|
39
|
+
- **`imprint seal .`** shows what it is about to send and asks first (`--yes` skips the
|
|
40
|
+
question). Only the files that changed since the last seal are sent. It checks the server's
|
|
41
|
+
signature and log proof, signs the result with your developer key, and prints the Imprint
|
|
42
|
+
ID and a link to its public page on [app.codeimprint.ai](https://app.codeimprint.ai).
|
|
43
|
+
- **`imprint verify`** checks a seal offline: digest, server attestation, your signature, log
|
|
44
|
+
inclusion and the RFC 3161 timestamp. `--online` also checks the live log.
|
|
45
|
+
|
|
46
|
+
Other commands: `imprint check` (compare a project with a protected Imprint; similarity is
|
|
47
|
+
evidence, not proof), `imprint chain`, `imprint hook install`, `imprint identity`,
|
|
48
|
+
`imprint claim`, `imprint github link` and more. Run `imprint --help`.
|
|
49
|
+
|
|
50
|
+
## What leaves your machine
|
|
51
|
+
|
|
52
|
+
`imprint seal` and `imprint check` upload the project's files to the CodeImprint server you
|
|
53
|
+
signed in to, which fingerprints them and deletes them at once; only the Imprint is kept.
|
|
54
|
+
Your developer key never leaves your machine: only its public half is sent.
|
|
55
|
+
|
|
56
|
+
## Licence
|
|
57
|
+
|
|
58
|
+
Apache-2.0. The client contains no part of the CodeImprint engine, which runs on the server.
|
|
59
|
+
"Mudrika" and "CodeImprint" are trademarks of their owner (see NOTICE).
|