Huang Huang

Results 149 comments of Huang Huang

> Before I'm reviewing those new changes, we talked about it with some kube-bench users, and those changes are breaking the output for automation and other projects using kube-bench so...

@sm171190 Thanks for your contribution. The audit contents look like don't have a syntax problem. IMHO, the root cause of https://github.com/aquasecurity/kube-bench/discussions/1125 is the `oc` command was running failed due to...

@winkee01 Thanks for reporting. The content of `remediation` was copied from the CIS Kubernetes Benchmark. And `the blow parameter` is the `--event-qps` flag. > I don't know what is an...

@luis-serra-ki Thanks for your contribution!

@serrovsky-pt Could you please take a look at these new comments? Thanks!

Thanks for reporting. I'll check it later.

主要原因是编码问题。只需要统一所有字符串为 unicode 就可以了: * 把 line 解码成 unicode * 把 dic 中的字符串也解码成 unicode output.dat 乱码是因为当字符串不是 unicode 时,单个汉字的长度不是 1 导致切分时会出现把一个字切成两半的问题: ```python >>> s = '你好' >>> len(s) 6 >>> s[:2] '\xe4\xbd'...

@nlpjoe 用你的代码及“在decode再encode成UTF-8编码”的思路复现了问题,原因是因为:你的 `max_match_segment` 没有考虑 “`line` 字符串的最后几个字符不在词典内”的情况,比如: `立体声等功能。` 分成了 `立体声 等功 能` ,跟原始字符串相比少了后面的 `。` ,导致 eval.py 代码中的检查失败。 处理一下这种情况就可以正常运行 eval.py 程序了。