chore: sync local changes, add Chinese docs and opencode config

This commit is contained in:
AuraK Developer
2026-08-31 11:37:03 +08:00
parent 307d2fd471
commit ecc55158c1
81 changed files with 7645 additions and 144 deletions
+13
View File
@@ -139,6 +139,19 @@ class TestVulnerabilityHeuristic:
assert result["value"] >= 1
assert result["grade"] in ("warn", "fail")
def test_note_is_chinese(self, tmp_path):
"""The metric note must follow the report language (Chinese), not
English. Technical proper nouns (OWASP, npm audit) may remain."""
Path(tmp_path, "s.py").write_text(
"def f():\n return 1\n",
encoding="utf-8",
)
result = compute_vulnerability_heuristic(["s.py"], tmp_path)
assert result["note"]
assert "启发式" in result["note"]
# the body is Chinese, not the old English sentence
assert "Heuristic OWASP/secret-pattern scan" not in result["note"]
# ---------------------------------------------------------------------------
# dedupe_findings