GaurabAryal/reddit-stock-experiment
Can Reddit beat the stock market? AI-powered experiment scoring reasoning quality in r/ValueInvesting and backtesting against S&P 500.
unreviewed-ai-risk
- Repository: https://github.com/GaurabAryal/reddit-stock-experiment
- Commit:
e07bb52ef1cb589ffa43465173156f167795168c - Generated: 2026-11-13T23:43:28+00:00
- Scorer 0.1.0, scoring prov-4+qual-2+sec-2, report schema v2
Scores
Unreviewed AI code risk: a large share of this code is explicitly AI-attributed, and its tests or review process are weak while quality or security scores are low.
| Pillar | Score | Signal | Confidence | Coverage |
|---|---|---|---|---|
| AI provenance (estimated AI-generated share) | 100 | explicit | 70% | 100% |
| Code quality | 26 | poor | 90% | 100% |
| Security | 86 | strong | 85% | 100% |
AI provenance
Explicit AI attribution on 100% of first-party code added; an estimated 100% including velocity signals.
- Explicitly attributed share (lower bound): 100.0%
- Unattributed share in AI-consistent velocity bursts: 0.0%
- Estimated AI-generated share: 100.0%
| AI tool | Attributed commits | Lines added |
|---|---|---|
| Claude Code | 1 | 3,699 |
Current source lines last changed by AI-attributed commits: 3,699 of 3,699.
Too few lines in one group to compare finding densities.
- Stylometry index: 0.14 per 1,000 lines (narrated steps 0, placeholders 0, assistant phrasing 0, emoji 1). Reported as a signal, not scored.
| Month | Lines added | Attributed to AI |
|---|---|---|
| 2026-03 | 3,699 | 100% |
Evidence
- Claude Code: trailer 'Co-Authored-By: Claude' (e07bb52ef1cb)
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 poor: test-to-source ratio 0.00, no CI test run detected; 22% of function code in complex or long functions; 13% duplicated lines. Weakest area: testing.
| Area | Score |
|---|---|
| Complexity (lizard) | 52 |
| Duplication | 46 |
| Code smells (Opengrep) | 1 |
| Tests and CI | 0 |
| Documentation | 40 |
| Type safety | 40 |
| Process (Scorecard review/maintenance) | n/a |
- Functions: 38; mean complexity 7.6, 90th percentile 16; 5 complex and 0 long functions
- Duplicated lines: 12.8% of 2,946 compared
- Tests: 0 test lines for 3,699 source lines (ratio 0.00); CI test commands: none detected; 0% of recent source commits also change tests
- Docs missing or thin: license, contributing, changelog
Most complex functions:
- generate_dashboard in src/5_build_dashboard.py: complexity 28, 36 lines
- generate_scoring_html in src/3_score_reasoning.py: complexity 21, 20 lines
- build_portfolios in sept_validation/merge_and_backtest.py: complexity 18, 38 lines
- generate_html in src/4_backtest.py: complexity 16, 30 lines
- main in src/4_backtest.py: complexity 16, 73 lines
Security
Security posture is strong: no high-impact findings. Weakest area: posture.
| Area | Score |
|---|---|
| Secrets (gitleaks, tree + history) | 100 |
| Static analysis (Opengrep) | 98 |
| Vulnerable dependencies (OSV) | 100 |
| 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/python.lang.security.audit.dynamic-urllib-use-detected: Detected a dynamic value being used with urllib. urllib supports 'file://' schemes, so a dynamic value controlled by a malicious actor may allow them to read arbitrary files. Audit uses of urllib calls to ensure user data cannot control the URLs, or consider using the 'requests' library instead. [confidence low] |
sept_validation/fetch_threads.py:28 |
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
- Source lines: 3,699; test lines: 0
| Language | Lines |
|---|---|
| Python | 3,699 |