Repository navigation
Conversation
Contributor
|
Claude finished @mbevc1's task in 1m 44s —— View job Follow-up review — commits since last review
Previous finding status:
No new inline comments — the only change since the last review is this wording fix, and it introduces no new issues. |
mbevc1
marked this pull request as ready for review
November 27, 2026 22:13
…po info In a supported CI the attest commands default --commit and the repository flags from the environment. A job in one repository that attests to a trail belonging to another repository's build therefore attached its own commit and repository to that trail, and had no supported way not to: --commit="" is refused as an empty value, and leaving the flag out restores the default. --no-commit-info sends the attestation without git_commit_info and without the repository info defaulted from the CI environment, with no commit lookup and no warning. Repository flags passed explicitly are still sent, so the caller can name the repository the trail belongs to; they are not completed from the CI's values. The origin URL is kept: it says where the attestation was sent from, which stays true. The flag fails with an explicit --commit, and on the pull request and Jira attestations, which need the commit to do their work. A general switch for all CI defaults was rejected as too broad, and allowing --commit="" as an exception to the empty-value rule would let an unset shell variable drop the commit silently. Closes #1418
…flict The golden page for attest snyk lists every flag of the command, so the new --no-commit-info flag made TestDocsCmdSnyk fail. A commit set through KOSLI_COMMIT or the config file counts as passed, so a pipeline exporting it met an error naming a flag nobody typed. The message now says where else the value can come from. Refs #1418
…-commit The message blamed KOSLI_COMMIT or the config file even when --commit was typed on the command line, which is the common case. Refs #1418
mbevc1
force-pushed
the
20261127_attest-no-commit-info
branch
from
November 27, 2026 22:13
427ae3a to
71cb17f
Compare
mbevc1
enabled auto-merge (squash)
November 27, 2026 22:17
3 tasks done
mbevc1
disabled auto-merge
November 28, 2026 20:43
Contributor
Author
|
#1421 needs to be reviewed and merged first! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
--no-commit-infoto thekosli attestcommands, so an attestation can be sent without the commit and repository info the CLI defaults from the CI environment.In a supported CI, the attest commands default
--commitand the repository flags from the environment. A job in one repository that attests to a trail belonging to another repository's build therefore attaches its own commit and repository to that trail. There was no supported way to prevent this:--commit=""is refused as an empty value, and leaving the flag out restores the default.Closes #1418
git_commit_infois sent, with no commit lookup and no warning, with or without a checkout.--repository,--repo-url,--repo-idand--repo-providerare sent only when passed explicitly, so the caller can name the repository the trail belongs to.--commit: fails, whether the commit was passed as a flag or set throughKOSLI_COMMITor the config file.Options considered
The issue lists three. This PR implements the first.
--no-ci-defaultsswitch: rejected as too broad. It would also drop the origin URL, and each command would need its own definition of "no defaults".--commit="": rejected. An exception to the empty-value rule would let an unset shell variable drop the commit silently.Notes for review
kosli attest artifact,kosli attest in-totoandkosli begin trailare unchanged; the issue covers attesting to an existing trail.KOSLI_REPOSITORYand the other repo variables count as explicit, like the flags, and are sent.attest sonar:--sonar-revisionstill defaults to the CI commit, since it names the revision that was scanned, not a commit attached to the attestation.--fingerprintto be passed.empty-flag-audit-coverage.json,spec.json,categories.json). The five commands that need the commit use the valuefalsein the spec, sincetruefails there by design.Checklist
charts/k8s-reporter/) updated, if needed. Note: these changes live in a separate PR (not needed)