Skip to content

fix: resolve 46 CodeQL alerts and 6 Dependabot vulnerabilities#161

Merged
darious merged 1 commit intomainfrom
feature/security-fixes
Apr 30, 2026
Merged

fix: resolve 46 CodeQL alerts and 6 Dependabot vulnerabilities#161
darious merged 1 commit intomainfrom
feature/security-fixes

Conversation

@darious
Copy link
Copy Markdown
Owner

@darious darious commented Apr 30, 2026

Summary

  • Resolve all open CodeQL alerts (46) and Dependabot vulnerabilities (6)
  • No breaking changes — all tests pass (317 passed, 1 skipped), lint clean, web build succeeds

CodeQL fixes

  • Add permissions: contents: read to all 3 PR workflows
  • Parameterize SQL queries in recommendation endpoints using unnest($N) and ANY($N)
  • Validate SHA1 format (40-char hex) and resolve artwork paths safely
  • Replace URL substring checks with urlparse hostname matching in MusicBrainz/album scanners
  • Add usedforsecurity=False to Qobuz API MD5 calls (required by their protocol)
  • Fix script tag regex to handle whitespace in close tags (</script\s*>)
  • Remove exception details from Last.fm sync manager error reporting
  • Replace deprecated aiodns query() with query_dns() plus correct DNSResult handling

Dependabot

  • Upgrade ecdsa 0.19.1→0.19.2, pyasn1 0.6.1→0.6.3, Pygments 2.19.2→2.20.0
  • Override cookie to ^0.7.0 in web package.json (SvelteKit transitive dep, no newer kit release available)

🤖 Generated with Claude Code

Copy link
Copy Markdown

@github-advanced-security github-advanced-security AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Comment thread app/main.py Fixed
Comment thread app/media/art.py Fixed
Comment thread app/scanner/services/qobuz.py Fixed
Comment thread app/scanner/services/qobuz.py Fixed
Comment thread scripts/sample/mb_to_qobuz.py Fixed
Comment thread scripts/sample/mb_to_qobuz.py Fixed
Comment thread scripts/test-ext-api.py Fixed
Comment thread scripts/test-ext-api.py Fixed
Comment thread app/scanner/services/qobuz.py Fixed
Comment thread app/scanner/services/qobuz.py Fixed
Comment thread scripts/sample/mb_to_qobuz.py Dismissed
Comment thread scripts/sample/mb_to_qobuz.py Dismissed
Comment thread scripts/test-ext-api.py Dismissed
Comment thread scripts/test-ext-api.py Dismissed
Comment thread app/media/art.py Fixed
- Fix SQL injection in recommendation.py using parameterized unnest/ANY
- Fix path injection in art.py and main.py with os.path.realpath() containment
- Fix incomplete URL sanitization in musicbrainz.py, album.py, mb_to_qobuz.py
- Fix weak MD5 usage in qobuz.py, test-ext-api.py, mb_to_qobuz.py (Qobuz API protocol)
- Fix bad tag filter regex in charts.py and sample/chart.py
- Fix stack trace exposure in lastfm.py
- Fix aiodns deprecation in dns_resolver.py (query_dns with pycares result)
- Add workflow permissions blocks (contents: read)
- Patch Dependabot vulnerabilities (ecdsa, pyasn1, Pygments, cookie)
- Add CodeQL advanced setup with config (paths-ignore scripts/, query-filters)
- Rewrite README for clarity and .env-based configuration
- Expand CONTRIBUTING.md with dev setup instructions
- Add docs/scanner.md with CLI reference
@darious darious force-pushed the feature/security-fixes branch from b64a5ee to 9d90a2d Compare April 30, 2026 10:55
@darious darious merged commit 55a5912 into main Apr 30, 2026
7 checks passed
@darious darious deleted the feature/security-fixes branch April 30, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants