Skip to content

feat(sec-core): add hermes-plugin framework and add code scan support for hermes#536

Open
yangdao479 wants to merge 3 commits into
alibaba:mainfrom
yangdao479:feature/agent-sec-core/hermes-support
Open

feat(sec-core): add hermes-plugin framework and add code scan support for hermes#536
yangdao479 wants to merge 3 commits into
alibaba:mainfrom
yangdao479:feature/agent-sec-core/hermes-support

Conversation

@yangdao479
Copy link
Copy Markdown
Collaborator

@yangdao479 yangdao479 commented May 15, 2026

Description

Related Issue

closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional change)
  • Performance improvement
  • CI/CD or build changes

Scope

  • cosh (copilot-shell)
  • sec-core (agent-sec-core)
  • skill (os-skills)
  • sight (agentsight)
  • tokenless (tokenless)
  • Multiple / Project-wide

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the documentation accordingly
  • For cosh: Lint passes, type check passes, and tests pass
  • For sec-core (Rust): cargo clippy -- -D warnings and cargo fmt --check pass
  • For sec-core (Python): Ruff format and pytest pass
  • For skill: Skill directory structure is valid and shell scripts pass syntax check
  • For sight: cargo clippy -- -D warnings and cargo fmt --check pass
  • For tokenless: cargo clippy -- -D warnings and cargo fmt --check pass
  • Lock files are up to date (package-lock.json / Cargo.lock)

Testing

Additional Notes

… for hermes

Signed-off-by: yizheng <YiZheng.Yang@linux.alibaba.com>
@github-actions github-actions Bot added component:sec-core src/agent-sec-core/ scope:documentation ./docs/|./*.md|./NOTICE labels May 15, 2026
Signed-off-by: yizheng <YiZheng.Yang@linux.alibaba.com>
Signed-off-by: yizheng <YiZheng.Yang@linux.alibaba.com>
@yangdao479 yangdao479 force-pushed the feature/agent-sec-core/hermes-support branch from 136df39 to 047733a Compare May 15, 2026 07:05
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hermes-plugin 目录没有在 rpm 打包里面

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

故意为之, 后续更新。不和build-all的逻辑同步开发


```bash
# 从 agent-sec-core 目录执行
uv run --project agent-sec-cli pytest tests/unit-test/hermes-plugin/ -v
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hermes-plugin/README.md 里的测试路径 pytest tests/hermes-plugin/ ,两个不一致

Comment on lines 13 to 20
# 1. agent-sec-cli/pyproject.toml (project.version)
# 2. agent-sec-cli/Cargo.toml (package.version)
# 3. agent-sec-cli/src/agent_sec_cli/__init__.py (__version__)
# 4. agent-sec-cli/src/agent_sec_cli/cli.py (fallback version)
# 5. openclaw-plugin/package.json ("version" field)
# 6. openclaw-plugin/openclaw.plugin.json ("version" field)
# 7. cosh-extension/cosh-extension.json ("version" field)
# 8. Lock files: Cargo.lock, uv.lock, package-lock.json (auto-regenerated)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这里也更新一下,Hermes

return {"action": "block", "message": msg}
return None

logger.info(f"PASS tool={tool_name} code={code[:120]}")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

scan-code 输出 verdict=error 时被当作 PASS 静默放行

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

Labels

component:sec-core src/agent-sec-core/ scope:documentation ./docs/|./*.md|./NOTICE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants