Skip to content

Commit e386693

Browse files
ToreMerkelyclaude
andcommitted
Release: Added extra debug when doing kosli attest pullrequest github if the debug flag is set (#839)
* debug(github): log GitHub HTTP requests/responses under --debug Adds a debug http.RoundTripper to the github client so every REST and GraphQL call (request method/URL/headers/body and response status/headers/body) is dumped to stderr with the [debug-github] prefix when --debug is set. Authorization header is redacted to the last 4 chars to make CI logs safe to share. Wires global.Debug through NewGithubRetrieverFunc / NewGithubConfig / NewGithubClientFromToken and updates affected tests. Also adds .github/workflows/debug-build.yml to build the CLI on this branch and upload it as the kosli-debug artifact for ad-hoc debugging. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(github): silence errcheck on debug Fprintf calls CI golangci-lint flagged the Fprintf calls in the debug RoundTripper because their error returns weren't checked. Wrap them in a small logf helper that explicitly discards the error — write failures to a debug stderr stream are not actionable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: fix Debug build trigger to match this branch name Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: debug-build runs on any branch and produces all platforms Trigger on every push (and workflow_dispatch). Cross-compile for the five platforms GoReleaser produces (linux/darwin/windows × amd64/arm64 where applicable) and bundle them into a single kosli-debug artifact. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: split debug-build into one artifact per platform Use a matrix so each platform builds in its own job and uploads a separate kosli-debug-<os>-<arch> artifact, instead of one large zip. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: write each artifact URL to the run summary upload-artifact@v4+ returns an artifact-url output. Append a markdown link for each platform's artifact to $GITHUB_STEP_SUMMARY so the run page shows direct download links instead of having to dig into the Artifacts panel. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: also expose nightly.link URLs in debug-build summary Add a second public-download link alongside each GitHub artifact link. nightly.link is an OAuth proxy that lets anyone download a public repo's Actions artifacts without signing in to GitHub. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * debug(github): redact Cookie/Set-Cookie/Proxy-Authorization too The debug RoundTripper was only redacting Authorization. Add Cookie, Set-Cookie, and Proxy-Authorization to the redaction list so a corporate proxy password (Proxy-Authorization is commonly Basic <base64(user:pass)> in HTTPS_PROXY setups) doesn't leak into shared debug logs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: remove temporary debug-build workflow This workflow was added to produce ad-hoc kosli-debug binaries while debugging the GitHub auth issue. The debug logging itself remains in the github transport. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(github): cover redactAuthHeader and redactSensitiveHeader These are pure security-relevant helpers in the debug RoundTripper. Add table tests covering the branches: scheme + long/short/4-char token, no-scheme long/short/empty values, the case-insensitive Authorization match, the fully-redacted families (Cookie, Set-Cookie, Proxy-Authorization), pass-through for non-sensitive headers, and explicit assertion that X-OAuth-Scopes is intentionally not redacted (useful for diagnosing GitHub permission failures). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e450fac commit e386693

84 files changed

Lines changed: 220 additions & 91 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"currentversion": "v2.17.2"}
1+
{"currentversion": "v2.17.3"}

docs.kosli.com/content/legacy_ref/v2.15.2/_index.md

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: v2.15.3
33
bookCollapseSection: true
4-
weight: 603
4+
weight: 604
55
---
66

77
# v2.15.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: v2.16.0
33
bookCollapseSection: true
4-
weight: 602
4+
weight: 603
55
---
66

77
# v2.16.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: v2.17.0
33
bookCollapseSection: true
4-
weight: 601
4+
weight: 602
55
---
66

77
# v2.17.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: v2.17.1
33
bookCollapseSection: true
4-
weight: 600
4+
weight: 601
55
---
66

77
# v2.17.1
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: v2.17.2
3+
bookCollapseSection: true
4+
weight: 600
5+
---
6+
7+
# v2.17.2
File renamed without changes.

docs.kosli.com/content/legacy_ref/v2.15.2/kosli_allow_artifact.md renamed to docs.kosli.com/content/legacy_ref/v2.17.2/kosli_allow_artifact.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ kosli allow artifact [IMAGE-NAME | FILE-PATH | DIR-PATH] [flags]
1515

1616
Add an artifact to an environment's allowlist.
1717

18-
The artifact fingerprint can be provided directly with the `--fingerprint` flag, or
18+
The artifact fingerprint can be provided directly with the `--fingerprint` flag, or
1919
calculated based on `--artifact-type` flag.
2020

2121
Artifact type can be one of: "file" for files, "dir" for directories, "oci" for container
2222
images in registries or "docker" for local docker images.
2323

24+
Note: `--artifact-type=docker` reads the image's repo digest via the local Docker daemon.
25+
The image must have been pushed to or pulled from a registry for a repo digest to exist;
26+
a freshly built image (just `docker build`) will not have one. If the image is already in
27+
a registry, prefer `--artifact-type=oci`, which fetches the digest directly from the
28+
registry without needing a local Docker daemon.
29+
2430

2531

2632
## Flags

docs.kosli.com/content/legacy_ref/v2.15.2/kosli_archive_attestation-type.md renamed to docs.kosli.com/content/legacy_ref/v2.17.2/kosli_archive_attestation-type.md

File renamed without changes.

0 commit comments

Comments
 (0)