packages

Record an informational security audit for the exact published version of a saved package: its published commit plus ...

Record an informational security audit for the exact published version of a saved package: its published commit plus capability-set fingerprint (both shown in the security audit prompt on the package capability approval page, and in the security_audit next step packageUpdate returns when a package moves toward internet-visible). Review that version first: declared vs used credentials, leaked credentials, unintended public exposure, risky network hosts, and package storage use. Then record verdict pass or concerns with a plain-language summary. The audit is tied to that commit and fingerprint; a new publish or changed capability set reads as not audited again. Recording an audit approves nothing by itself. One exception: when a request to make the package internet-visible is already pending (packageUpdate internet_visible: true), recording verdict pass re-evaluates self-publish, which makes the package internet-visible without the owner click (self_published: true) when the resolved capability set is empty and nothing in its dependency tree declares a credential or another capability. Otherwise hand the owner approval_url next. Requires package:read (to review the source) as well as package:write. Token-shaped strings in the summary are redacted.

Org permission: package:write.

post/v1/packages/{package_id}/security-audits

Request

  • Base URL: https://api.kody.codes
  • URL: https://api.kody.codes/v1/packages/{package_id}/security-audits
  • Auth: HTTP bearer

Path parameters

package_idstring required

Saved package id that was audited.

Request body

published_commitstring required

Published commit SHA that was reviewed. Must match the package current published commit.

fingerprintstring required

Capability-set fingerprint that was reviewed. Must match the package current capability fingerprint.

verdict'pass' | 'concerns' required

pass when nothing concerning was found; concerns when the owner should look closer before approving.

summarystring required

Plain-language summary for the package owner: what was checked, what was found, and anything they should look at before approving. No secret values.

auditorstring

Optional name of the agent or person who performed the review, shown as "Audited by …". Defaults to the signed-in user.

Response

Success.

oktrue required
audit_idstring required
package_idstring required
published_commitstring required
fingerprintstring required
verdict'pass' | 'concerns' required
recorded_atstring required
audit_urlstring required
approval_urlstring required

The package approval page to hand the owner next.

next_stepstring required
self_publishedtrue

Present when this pass made the package internet-visible through self-publish for a pending internet-visible request.

self_publish_blockerstring

Present when an internet-visible request is pending and self-publish still does not apply; the owner approves at approval_url. Same values as packageUpdate self_publish_blocker.

Changes

No recorded changes to this operation across all 1 revision of this API.