klaws — Korean compliance risk scanner

v0.1.6
io.github.rostradamus/klaws Checked 6 hours ago Published 4 months ago

Scan code for Korean compliance risks — PIPA/개인정보보호법, Network Act, Credit Info.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_law_reference

Look up a bundled Korean law provision by ID and return its Korean and English names, a plain-language summary, the source URL on law.go.kr, a risk level, and (when available) the full Korean article text. Typically used to expand a related_laws ID returned by a scan. This is reference material, not legal advice.

ParameterTypeDescription
law_id *stringBundled provision ID. Examples by law: PIPA-15, PIPA-29 (개인정보 보호법); NIA-22, NIA-50 (정보통신망법); CIA-19 (신용정보법); ECA-6 (전자상거래법).
livebooleanIf true, fetch the latest full text from law.go.kr (requires network access). If false (default), use the text bundled in the binary.

list_detectors

List every available compliance risk detector with its id, name, description (the code pattern it looks for), and the related_laws it maps to. Use this to explain what klaws checks for, or to see which risks to expect before scanning. Takes no arguments.

scan_directory

Scan all matching files in a directory tree for possible Korean compliance risks across PIPA, the Network Act, the Credit Information Act, and the E-Commerce Act. Returns a JSON report where each finding has a detector_id, risk_level (HIGH or MEDIUM), file_path, line_number, snippet, a hedged message, and related_laws (provision IDs you can pass to get_law_reference). Findings are possible risks for review, not legal conclusions. Use this for a whole project or folder; use scan_file for a single file.

ParameterTypeDescription
path *stringAbsolute path to the directory to scan (e.g. /Users/me/project/src).
file_patternstringGlob pattern selecting which files to scan. Defaults to *.java. Examples: "*.java", "*.kt". Detectors target Java/Kotlin-style source.

scan_file

Scan a single source file for possible Korean compliance risks and return the same JSON report shape as scan_directory. Use this to check one file (for example, the file currently being edited); use scan_directory to review a whole project. Findings are possible risks for review, not legal conclusions.

ParameterTypeDescription
path *stringAbsolute path to the file to scan (e.g. /Users/me/project/src/UserService.java).