feat(api): expose security evaluation results#362
Open
abutbul wants to merge 4 commits intoopenclaw:mainfrom
Open
feat(api): expose security evaluation results#362abutbul wants to merge 4 commits intoopenclaw:mainfrom
abutbul wants to merge 4 commits intoopenclaw:mainfrom
Conversation
- Add security field to skill version API responses - Map llmAnalysis database field to public API format - Display security info in CLI inspect command - Enable security tools like clawsec-clawhub-checker to access internal security checks Security field includes: - status: clean|suspicious|malicious|pending|error - hasWarnings: boolean - checkedAt: timestamp - model: evaluation model name Backward compatible: optional field, no breaking changes.
Contributor
|
@abutbul is attempting to deploy a commit to the Amantus Machina Team on Vercel. A member of the Team first needs to authorize it. |
- Add ?? false to coerce undefined to false when dimensions is undefined - Fixes Greptile comment: hasWarnings can be undefined instead of boolean - Ensures SecurityStatusSchema validation passes on client side
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Author
|
Hey this will allow skills to double check before downloading a potentially malicious skill. |
Merged
11 tasks
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.
Security field includes:
Backward compatible: optional field, no breaking changes.
Greptile Summary
This PR adds a
securityfield to the skill version API response by mapping the internalllmAnalysisdatabase field to a public-facing format. It also displays the security status in the CLIinspectcommand and adds aSecurityStatusSchemato the shared schema package.hasWarningscan beundefined: Whenverdictis'benign'anddimensionsis absent (both are optional in the DB schema), thehasWarningsexpression evaluates toundefinedinstead ofboolean, which will failSecurityStatusSchemavalidation on the client side.checkedAtuses||instead of??: The||operator treats0as falsy, which would incorrectly map acheckedAtvalue of0tonull.SecurityStatusSchema) and CLI display logic look correct and are backward compatible.Confidence Score: 3/5
hasWarningsbug will cause client-side schema validation failures for versions with a benign verdict and no dimensions, which is a common case.hasWarningsexpression has a concrete bug that will produceundefinedinstead ofbooleanin a common code path (benign verdict without dimensions). ThecheckedAtissue is lower risk but still incorrect.convex/httpApiV1/skillsV1.ts— thehasWarningsandcheckedAtmapping logic needs fixes before merge.Last reviewed commit: 809cc4f
(2/5) Greptile learns from your feedback when you react with thumbs up/down!
Context used:
dashboard- AGENTS.md (source)