Skip to content

Add OpenClaw scanner checks#24

Open
mindbomber wants to merge 1 commit into
inkog-io:mainfrom
mindbomber:codex/openclaw-security-adapter
Open

Add OpenClaw scanner checks#24
mindbomber wants to merge 1 commit into
inkog-io:mainfrom
mindbomber:codex/openclaw-security-adapter

Conversation

@mindbomber

@mindbomber mindbomber commented May 6, 2026

Copy link
Copy Markdown

Closes #3.

Summary

  • add a local OpenClaw scanner slice for TOOLS.md, SKILL.md, SHIELD.md, SOUL.md, and AGENTS.md
  • report local governance findings for missing SHIELD.md, risky tool capability language without human approval language, and prompt-injection wording in OpenClaw tool/capability config
  • include focused tests for OpenClaw config recognition and finding generation

Scope notes

This is a narrow first slice in the CLI scanner. I did not claim full Universal IR coverage for OpenClaw because this checkout exposes the local CLI scanner, while broader server-side/IR adapter work appears to live outside this branch.

Verification

  • go test ./...
  • git diff --check

AANA note

This PR was selected and published through an AANA-gated community issue workflow. AANA was used only as a verifier/correction gate for issue fit, public-claim boundaries, and publish readiness; it is not a security certification or compliance approval.


Summary by cubic

Adds a local OpenClaw scanner to the CLI to detect OpenClaw configs and surface governance risks. Flags missing SHIELD.md, destructive tool language without human approval, and prompt-injection phrasing.

  • New Features
    • Scans TOOLS.md, SKILL.md, SHIELD.md, SOUL.md, AGENTS.md locally.
    • Findings:
      • CRITICAL: openclaw_missing_shield
      • HIGH: openclaw_destructive_tool_without_approval when destructive terms appear without approval wording
      • MEDIUM: openclaw_prompt_injection_vector
    • Integrated into HybridScanner local scan and file filter.
    • Adds targeted tests for config recognition and finding generation.

Written for commit 3914401. Summary will update on new commits.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

@cloakmaster

Copy link
Copy Markdown
Member

Hey, thanks for picking this up. Really nice PR — code is clean, tests are solid, and you got the finding shape right (the EU AI Act Article 14 mapping is exactly what I wanted).

Two things I want to think through with you before I merge. Neither is a dealbreaker, just curious about your thinking:

  1. The substring check on terms like "delete" and "exec" will fire on things like "do not delete X" or comments saying "// never exec this." Word boundaries or a small regex would tighten it a lot. What's your take?

  2. The approval check looks at all five config files together. So if SOUL.md mentions "oversight" once, destructive findings in TOOLS.md don't fire even if the tools themselves have no approval near them. Was that on purpose? I'd lean toward checking inside a window around each destructive line, but want to know what you were going for.

If either of those feels like more work than you signed up for, just say and I'll handle it on this branch and credit you on the merge.

Unrelated — the PR body mentions an AANA-gated workflow. I run an agent-security tool (the one you just contributed to!) and the idea of using AI to scout issues and submit PRs is genuinely smart. Curious how you're running it. Want to do a 20-min Zoom this week or next? I think there might be a real way for us to work together.

Thanks again. The OpenClaw scanner is useful and I want it merged once we sort those two.

@cloakmaster

Copy link
Copy Markdown
Member

Hey — just bumping in case this got buried. No rush, just want to keep the door open. Either of those questions still feel right to you, or want me to take it over and credit you on the merge?

@mindbomber

Copy link
Copy Markdown
Author

Thanks for the bump, and sorry this sat for a few days.

Your two points still feel right to me. The current implementation was intentionally a narrow first slice, but I agree it is too broad in both places:

  1. The destructive term detection should be tightened with word-boundary style matching so it does not fire on incidental substrings or obvious negated/commentary examples.
  2. The approval/oversight check should be local to the destructive capability, probably using a small window around the matched line, rather than treating any approval language anywhere across the five OpenClaw files as sufficient.

I am happy for you to take it over on this branch and credit me on the merge if that is the fastest path. If you would rather I do the follow-up, I can make those changes too.

And yes, I would be interested in a 20-min Zoom. AANA is being used as a verifier/correction gate around issue selection, claim boundaries, and publish readiness rather than as a security certification layer. I would be glad to walk you through how I am running it and see whether there is a useful collaboration path here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OpenClaw agent security scanning

2 participants