跳转到内容

cnb-rs repo code-issue

cnb-rs repo code-issue <subcommand>

仓库源码扫描问题子组。CNB 平台对仓库做静态代码扫描(漏洞 / 许可证 / 代码风险),本子组提供 list / view 入口。

子命令

风险等级

--risk-level 接受:info / warning / error / fatal / all

规则示例

--rule 接受规则名,例如:

  • critical-risk — 严重风险综合规则
  • LIC_CRITICAL — 关键许可证问题
  • VUL_CRITICAL — 关键漏洞

示例

bash
# 列出所有 critical 问题
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo code-issue list --risk-level fatal

# 只看许可证问题
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo code-issue list --rule LIC_CRITICAL

# 看某条问题详情
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo code-issue view 12345

# JSON 输出供脚本处理
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo code-issue list --json | jq '.list[].rule'

另请参阅

Released under the MIT License.