RepoTrust

huangzworks/annotated_redis_source

带有详细注释的 Redis 2.6 源码

https://github.com/huangzworks/annotated_redis_source · commit 67758fdfe196 · scored 2026-11-13 · scoring prov-4+qual-2+sec-2

RepoTrust ai badge RepoTrust quality badge RepoTrust security badge

Dispute this score or request a re-score Full report JSON

Scores

Pillar Score Signal Confidence Coverage
AI provenance (estimated AI-generated share) 0 none-detected 65% 100%
Code quality 53 weak 90% 100%
Security 74 adequate 85% 100%

AI provenance

No AI attribution or AI-consistent velocity signals detected.

Month Lines added Attributed to AI
2013-02 887 0%
2013-03 209 0%
2013-04 124 0%
2013-05 6 0%
2013-06 13 0%
2013-08 1 0%
2013-09 3 0%
2013-10 2 0%
2013-11 8 0%
2014-03 1 0%
2014-05 1 0%
2016-12 1 0%

Evidence

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.02, no CI test run detected; 26% of function code in complex or long functions; 7% duplicated lines. Weakest area: testing.

Area Score
Complexity (lizard) 46
Duplication 66
Code smells (Opengrep) 84
Tests and CI 21
Documentation 80
Type safety n/a
Process (Scorecard review/maintenance) n/a

Most complex functions:

Security

Security posture is adequate: 9 high-severity SAST findings. Weakest area: posture.

Area Score
Secrets (gitleaks, tree + history) 97
Static analysis (Opengrep) 82
Vulnerable dependencies (OSV) n/a
CI workflows (zizmor) n/a
Posture (policy, updates, signing, lockfiles) 0
OpenSSF Scorecard n/a

Top findings

Severity Finding Location
high opengrep/c.lang.security.double-free: Variable 'curargv' was freed twice. This can lead to undefined behavior. [confidence low] deps/hiredis/hiredis.c:900
high opengrep/c.lang.security.double-free: Variable 'cmd' was freed twice. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:113
high opengrep/c.lang.security.double-free: Variable 'cmd' was freed twice. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:119
high opengrep/c.lang.security.double-free: Variable 'cmd' was freed twice. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:125
high opengrep/c.lang.security.double-free: Variable 'cmd' was freed twice. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:131
high opengrep/c.lang.security.double-free: Variable 'cmd' was freed twice. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:137
high opengrep/c.lang.security.double-free: Variable 'cmd' was freed twice. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:143
high opengrep/c.lang.security.double-free: Variable 'cmd' was freed twice. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:194
high opengrep/c.lang.security.double-free: Variable 'cmd' was freed twice. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:200
medium opengrep/c.lang.security.function-use-after-free: Variable 'curargv' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/hiredis.c:899
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] deps/hiredis/net.c:214
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] deps/hiredis/net.c:274
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] deps/hiredis/sds.c:57
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] deps/hiredis/sds.c:120
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:110
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:111
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:111
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:116
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:117
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:117
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:122
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:123
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:123
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:128
medium opengrep/c.lang.security.function-use-after-free: Variable 'cmd' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] deps/hiredis/test.c:129

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.

Repository profile

Language Lines
C 90,793
Ruby 735
Lua 525
Shell 250
C++ 9

Embed a badge

Maintainers can show these in a README. Badges update when the repository is re-scored.

[![RepoTrust ai](https://repotrust.synapticcyber.com/badge/github.com/huangzworks/annotated_redis_source/ai.svg)](https://repotrust.synapticcyber.com/r/github.com/huangzworks/annotated_redis_source/)
[![RepoTrust quality](https://repotrust.synapticcyber.com/badge/github.com/huangzworks/annotated_redis_source/quality.svg)](https://repotrust.synapticcyber.com/r/github.com/huangzworks/annotated_redis_source/)
[![RepoTrust security](https://repotrust.synapticcyber.com/badge/github.com/huangzworks/annotated_redis_source/security.svg)](https://repotrust.synapticcyber.com/r/github.com/huangzworks/annotated_redis_source/)