shadowsocks/ChinaDNS
Protect yourself against DNS poisoning in China.
- Repository: https://github.com/shadowsocks/ChinaDNS
- Commit:
9e4261c78e911851f76a9b9113d48fcdc44ce32e - Generated: 2026-11-13T23:31:09+00:00
- Scorer 0.1.0, scoring prov-4+qual-2+sec-2, report schema v2
Scores
| Pillar | Score | Signal | Confidence | Coverage |
|---|---|---|---|---|
| AI provenance (estimated AI-generated share) | 0 | none-detected | 65% | 100% |
| Code quality | 55 | weak | 90% | 100% |
| Security | 65 | weak | 85% | 100% |
AI provenance
No AI attribution or AI-consistent velocity signals detected.
- Explicitly attributed share (lower bound): 0.0%
- Unattributed share in AI-consistent velocity bursts: 0.0%
- Estimated AI-generated share: 0.0%
| Month | Lines added | Attributed to AI |
|---|---|---|
| 2014-07 | 800 | 0% |
| 2014-08 | 223 | 0% |
| 2014-09 | 38 | 0% |
| 2014-11 | 41 | 0% |
| 2014-12 | 176 | 0% |
| 2015-01 | 318 | 0% |
| 2015-02 | 168 | 0% |
| 2015-04 | 541 | 0% |
| 2015-06 | 10 | 0% |
| 2015-07 | 12 | 0% |
| 2015-08 | 2 | 0% |
AI provenance describes how code was produced; it is not a quality judgment. Unless attribution is explicit, these are signals consistent with AI generation, not proof. Squash/rebase workflows, imported code, and rewritten history reduce accuracy.
Code quality
Code quality is weak: test-to-source ratio 0.05, no CI test run detected; 29% of function code in complex or long functions; 3% duplicated lines. Weakest area: testing.
| Area | Score |
|---|---|
| Complexity (lizard) | 41 |
| Duplication | 83 |
| Code smells (Opengrep) | 48 |
| Tests and CI | 39 |
| Documentation | 85 |
| Type safety | n/a |
| Process (Scorecard review/maintenance) | n/a |
- Functions: 29; mean complexity 7.0, 90th percentile 16; 4 complex and 0 long functions
- Duplicated lines: 3.0% of 984 compared
- Tests: 65 test lines for 1,291 source lines (ratio 0.05); CI test commands: none detected; 5% of recent source commits also change tests
- Docs missing or thin: contributing
Most complex functions:
- should_filter_query in src/chinadns.c: complexity 20, 64 lines
- dns_handle_local in src/chinadns.c: complexity 17, 81 lines
- parse_args in src/chinadns.c: complexity 16, 55 lines
- local_ns_parserr in src/local_ns_parser.c: complexity 16, 60 lines
Security
Security posture is weak: no high-impact findings. Weakest area: posture.
| Area | Score |
|---|---|
| Secrets (gitleaks, tree + history) | 100 |
| Static analysis (Opengrep) | 54 |
| Vulnerable dependencies (OSV) | n/a |
| CI workflows (zizmor) | n/a |
| Posture (policy, updates, signing, lockfiles) | 0 |
| OpenSSF Scorecard | n/a |
- Posture checks passed: lockfiles; missing: security policy, dependency updates, signed commits
Top findings
| Severity | Finding | Location |
|---|---|---|
| medium | opengrep/c.lang.security.insecure-use-memset: When handling sensitive information in a buffer, it's important to ensure that the data is securely erased before the buffer is deleted or reused. While memset() is commonly used for this purpose, it can leave sensitive information behind due to compiler optimizations or other factors. To avoi [confidence low] |
src/chinadns.c:179 |
| medium | opengrep/c.lang.security.insecure-use-memset: When handling sensitive information in a buffer, it's important to ensure that the data is securely erased before the buffer is deleted or reused. While memset() is commonly used for this purpose, it can leave sensitive information behind due to compiler optimizations or other factors. To avoi [confidence low] |
src/chinadns.c:183 |
| medium | opengrep/c.lang.security.insecure-use-memset: When handling sensitive information in a buffer, it's important to ensure that the data is securely erased before the buffer is deleted or reused. While memset() is commonly used for this purpose, it can leave sensitive information behind due to compiler optimizations or other factors. To avoi [confidence low] |
src/chinadns.c:320 |
| medium | opengrep/c.lang.security.insecure-use-strtok-fn: Avoid using 'strtok()'. This function directly modifies the first argument buffer, permanently erasing the delimiter character. Use 'strtok_r()' instead. [confidence low] |
src/chinadns.c:323 |
| medium | opengrep/c.lang.security.insecure-use-memset: When handling sensitive information in a buffer, it's important to ensure that the data is securely erased before the buffer is deleted or reused. While memset() is commonly used for this purpose, it can leave sensitive information behind due to compiler optimizations or other factors. To avoi [confidence low] |
src/chinadns.c:326 |
| medium | opengrep/c.lang.security.insecure-use-string-copy-fn: Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker [confidence low] |
src/chinadns.c:327 |
| medium | opengrep/c.lang.security.insecure-use-strtok-fn: Avoid using 'strtok()'. This function directly modifies the first argument buffer, permanently erasing the delimiter character. Use 'strtok_r()' instead. [confidence low] |
src/chinadns.c:350 |
| medium | opengrep/c.lang.security.insecure-use-strtok-fn: Avoid using 'strtok()'. This function directly modifies the first argument buffer, permanently erasing the delimiter character. Use 'strtok_r()' instead. [confidence low] |
src/chinadns.c:355 |
| medium | opengrep/c.lang.security.insecure-use-memset: When handling sensitive information in a buffer, it's important to ensure that the data is securely erased before the buffer is deleted or reused. While memset() is commonly used for this purpose, it can leave sensitive information behind due to compiler optimizations or other factors. To avoi [confidence low] |
src/chinadns.c:546 |
Static signals only: the scorer never runs the project's code. Secret findings are pattern matches that were not verified, and secret values are never stored.
Distribution signals
- binary-release-asset: release 1.3.2 ships chinadns-1.3.2.tar.gz (41758 downloads)
- binary-release-asset: release 1.3.1 ships chinadns-1.3.1.tar.gz (3363 downloads)
- binary-release-asset: release 1.3.0 ships chinadns-1.3.0.tar.gz (1548 downloads)
- binary-release-asset: release 1.2.2 ships chinadns-1.2.2.tar.gz (691 downloads)
- binary-release-asset: release 1.2.1 ships chinadns-c-1.2.1.tar.gz (1359 downloads)
Signals consistent with a repository that exists to distribute a download. They are heuristics, not a verdict; release files were not downloaded or inspected.
Repository profile
- Source lines: 1,291; test lines: 65
| Language | Lines |
|---|---|
| C | 1,174 |
| Shell | 117 |
| Python | 65 |