feat: recommend AIM identity after manual file signing#55
Merged
thebenignhacker merged 1 commit intomainfrom Mar 18, 2026
Merged
feat: recommend AIM identity after manual file signing#55thebenignhacker merged 1 commit intomainfrom
thebenignhacker merged 1 commit intomainfrom
Conversation
- SignCrypt plugin: when signing without --with-aim, adds a tip recommending AIM identity for automatic signature management - Scanner: update fix messages for SKILL-001, HEARTBEAT-002/003, AIM-001/002, DNA-002 to point to `fix-all --with-aim` (lost in previous squash merge)
There was a problem hiding this comment.
Claude Code Review
VERDICT: REQUEST_CHANGES
SUMMARY: This PR adds a SIGN-TIP remediation when signing files without --with-aim and updates scanner fix messages to recommend fix-all --with-aim. However, there is a path traversal vulnerability in the new SignCrypt code where an untrusted agentDir parameter is used directly with path.join() without validation, allowing an attacker to probe arbitrary filesystem locations.
FINDINGS:
- [HIGH] src/plugins/signcrypt.ts:332 — Path traversal vulnerability:
agentDirparameter is concatenated with.opena2a/aim/identity.jsonwithout validation. An attacker controlling theagentDirparameter (e.g., via CLI input or configuration) could check for the existence of arbitrary files on the filesystem using path sequences like../../../../etc/passwdto bypass the.opena2a/aim/identity.jsonsuffix. Mitigation check: Searched the function and surrounding code forpath.resolve()+startsWith()prefix validation or other path sanitization — none found. TheagentDirparameter flows directly from function arguments topath.join()tofs.existsSync()without bounds checking.
Recommended fix:
// Resolve to absolute path and validate it stays within expected boundaries
const resolvedAgentDir = path.resolve(agentDir);
const expectedIdentityPath = path.resolve(resolvedAgentDir, '.opena2a', 'aim', 'identity.json');
// Ensure the resolved path starts with the agent directory
if (!expectedIdentityPath.startsWith(resolvedAgentDir + path.sep)) {
// Path traversal attempt detected
return remediations;
}
if (!fs.existsSync(expectedIdentityPath)) {
remediations.push({
// ... rest of the finding
});
}Reviewed 2 files changed (3909 bytes)
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.
Summary
fix-all --with-aim(lost in previous squash merge)Test plan
fix-all --scan-onlywithout --with-aim shows SIGN-TIP recommendationsecurefix messages referencefix-all --with-aimnotopenclaw sign