coverart-cli 0.7.2__tar.gz → 0.7.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/workflows/release.yml +10 -6
  2. coverart_cli-0.7.4/.release-please-manifest.json +3 -0
  3. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/CHANGELOG.md +14 -0
  4. coverart_cli-0.7.4/CONTRIBUTING.md +128 -0
  5. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/PKG-INFO +10 -6
  6. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/README.md +9 -5
  7. coverart_cli-0.7.4/SECURITY.md +167 -0
  8. coverart_cli-0.7.4/docs/architecture.md +121 -0
  9. coverart_cli-0.7.4/docs/coverage-evidence.md +94 -0
  10. coverart_cli-0.7.4/docs/governance.md +64 -0
  11. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/docs/make_demo_report.py +3 -0
  12. coverart_cli-0.7.4/docs/releases.md +235 -0
  13. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/docs/repository-checks.md +17 -1
  14. coverart_cli-0.7.4/docs/roadmap.md +65 -0
  15. coverart_cli-0.7.4/docs/security-assurance.md +152 -0
  16. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/fuzz/fuzz_images.py +3 -0
  17. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/fuzz/fuzz_report.py +3 -0
  18. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/fuzz/make_image_corpus.py +3 -0
  19. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/pyproject.toml +1 -1
  20. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/scripts/__init__.py +3 -0
  21. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/scripts/check_coverage.py +3 -1
  22. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/scripts/check_repository.py +37 -1
  23. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/scripts/complete_release.py +3 -0
  24. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/__init__.py +4 -1
  25. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/__main__.py +3 -0
  26. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/_windows_filesystem.py +3 -0
  27. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/cli.py +3 -0
  28. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/config.py +3 -0
  29. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/core.py +3 -0
  30. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/errors.py +3 -0
  31. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/filesystem.py +3 -0
  32. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/providers/__init__.py +3 -0
  33. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/providers/base.py +3 -0
  34. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/providers/deezer.py +3 -0
  35. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/providers/itunes.py +3 -0
  36. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/providers/lastfm.py +3 -0
  37. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/providers/musicbrainz.py +3 -0
  38. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/report.py +3 -0
  39. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/tagging.py +3 -0
  40. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/templates/report.html +4 -0
  41. coverart_cli-0.7.4/tests/__init__.py +2 -0
  42. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/image_fixtures.py +3 -0
  43. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_cli.py +3 -0
  44. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_complete_release.py +3 -0
  45. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_config.py +3 -0
  46. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_coverage_gate.py +5 -3
  47. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_demo_report.py +3 -0
  48. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_dependency_updates.py +3 -0
  49. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_filesystem.py +3 -0
  50. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_integration.py +3 -0
  51. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_prepare_release.py +3 -0
  52. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_providers.py +3 -0
  53. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_release_workflow.py +25 -9
  54. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_report.py +3 -0
  55. coverart_cli-0.7.4/tests/test_repository_hygiene.py +154 -0
  56. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_repository_identity.py +3 -0
  57. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_security_boundaries.py +3 -0
  58. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_tagging.py +3 -0
  59. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/tests/test_windows.py +2 -0
  60. coverart_cli-0.7.2/.release-please-manifest.json +0 -3
  61. coverart_cli-0.7.2/SECURITY.md +0 -88
  62. coverart_cli-0.7.2/docs/releases.md +0 -102
  63. coverart_cli-0.7.2/tests/__init__.py +0 -0
  64. coverart_cli-0.7.2/tests/test_repository_hygiene.py +0 -68
  65. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.editorconfig +0 -0
  66. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/CODEOWNERS +0 -0
  67. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/dependabot.yml +0 -0
  68. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/windows-coverage.ini +0 -0
  69. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/workflows/automatic-release.yml +0 -0
  70. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/workflows/ci.yml +0 -0
  71. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/workflows/codeql.yml +0 -0
  72. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/workflows/dependabot-auto-merge.yml +0 -0
  73. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/workflows/fuzz.yml +0 -0
  74. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/workflows/pr-security-baseline.yml +0 -0
  75. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/workflows/prepare-release.yml +0 -0
  76. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.github/workflows/supply-chain.yml +0 -0
  77. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.gitignore +0 -0
  78. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.pre-commit-config.yaml +0 -0
  79. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/.python-version +0 -0
  80. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/LICENSE +0 -0
  81. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/docs/dependency-updates.md +0 -0
  82. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/release-please-config.json +0 -0
  83. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/renovate.json +0 -0
  84. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/requirements-attestation.in +0 -0
  85. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/requirements-attestation.txt +0 -0
  86. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/requirements-build-backend.in +0 -0
  87. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/requirements-build.in +0 -0
  88. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/requirements-build.txt +0 -0
  89. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/requirements-ci.txt +0 -0
  90. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/requirements-fuzz.in +0 -0
  91. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/requirements-fuzz.txt +0 -0
  92. {coverart_cli-0.7.2 → coverart_cli-0.7.4}/src/coverart_cli/py.typed +0 -0
@@ -1285,13 +1285,15 @@ jobs:
1285
1285
  local predicate="$2"
1286
1286
  shift 2
1287
1287
  local attempt status
1288
- for attempt in {1..12}; do
1288
+ # CDN visibility can lag a successful upload by more than a minute.
1289
+ # Keep three lookups within the enclosing 30-minute job timeout.
1290
+ for attempt in {1..18}; do
1289
1291
  status="$(pypi_http_status "$output" "$@")"
1290
1292
  if [ "$status" = "200" ] && "$predicate" "$output"; then
1291
1293
  return 0
1292
1294
  fi
1293
- if [ "$attempt" -lt 12 ]; then
1294
- sleep 5
1295
+ if [ "$attempt" -lt 18 ]; then
1296
+ sleep 10
1295
1297
  fi
1296
1298
  done
1297
1299
  return 1
@@ -1382,13 +1384,15 @@ jobs:
1382
1384
  local predicate="$2"
1383
1385
  shift 2
1384
1386
  local attempt status
1385
- for attempt in {1..12}; do
1387
+ # CDN visibility can lag a successful upload by more than a minute.
1388
+ # Keep three lookups within the enclosing 30-minute job timeout.
1389
+ for attempt in {1..18}; do
1386
1390
  status="$(pypi_http_status "$output" "$@")"
1387
1391
  if [ "$status" = "200" ] && "$predicate" "$output"; then
1388
1392
  return 0
1389
1393
  fi
1390
- if [ "$attempt" -lt 12 ]; then
1391
- sleep 5
1394
+ if [ "$attempt" -lt 18 ]; then
1395
+ sleep 10
1392
1396
  fi
1393
1397
  done
1394
1398
  return 1
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.7.4"
3
+ }
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.7.4](https://github.com/buettgen-app/coverart-cli/compare/v0.7.3...v0.7.4) (2026-10-20)
9
+
10
+
11
+ ### Documentation
12
+
13
+ * establish OpenSSF evidence and quality foundations ([cad18f6](https://github.com/buettgen-app/coverart-cli/commit/cad18f6e6888a5052addfa6cf9ceccf0b5ed21c6))
14
+
15
+ ## [0.7.3](https://github.com/buettgen-app/coverart-cli/compare/v0.7.2...v0.7.3) (2026-10-11)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * tolerate delayed PyPI artifact visibility within release timeouts ([ade1da1](https://github.com/buettgen-app/coverart-cli/commit/ade1da1104c54576edb27fa83b8775dbeb5c3ed9))
21
+
8
22
  ## [0.7.2](https://github.com/buettgen-app/coverart-cli/compare/v0.7.1...v0.7.2) (2026-10-11)
9
23
 
10
24
 
@@ -0,0 +1,128 @@
1
+ # Contributing to coverart-cli
2
+
3
+ Small fixes, regression tests, documentation improvements and bug reports are
4
+ welcome. Discuss a substantial behavior or dependency change in
5
+ [GitHub Issues](https://github.com/buettgen-app/coverart-cli/issues) first so the
6
+ scope and compatibility expectations are clear. Use English for shared project
7
+ documentation and reports. Report security vulnerabilities privately through
8
+ [SECURITY.md](SECURITY.md), not a public issue.
9
+
10
+ ## From an issue to a pull request
11
+
12
+ 1. Check existing issues and pull requests to avoid duplicating work. Describe
13
+ the user-visible problem and a reproducible example using synthetic data.
14
+ 2. Create a branch from current `main` in your fork or authorized checkout. Keep
15
+ one pull request focused on one coherent change.
16
+ 3. Implement and verify the change. For a bug fix, first add a regression that
17
+ fails for the original behavior where practical. Major new functionality
18
+ **must** include automated tests for its behavior and important failure paths.
19
+ Tests should assert outcomes, not just exercise implementation details.
20
+ 4. Update affected help text, examples and documentation. Explain compatibility,
21
+ security boundaries and any platform-specific limits.
22
+ 5. Open a pull request with the problem, resulting behavior, related issue,
23
+ commands/results, relevant source references and checks you could not run.
24
+ Use a [Conventional Commit](https://www.conventionalcommits.org/) title such
25
+ as `fix: preserve existing artwork when a provider fails` or
26
+ `docs: clarify report-only usage`. The [release guide](docs/releases.md)
27
+ explains which prefixes cause releases.
28
+ 6. Address review findings and rerun affected checks. New commits invalidate
29
+ conclusions about code they change; identify the final tested/reviewed SHA.
30
+
31
+ Do not commit credentials, real music files, private reports, personal paths,
32
+ generated coverage/build output or virtual environments. Use synthetic fixtures
33
+ and the privacy conventions in [repository checks](docs/repository-checks.md).
34
+ Preserve copyright and third-party license notices. Submit only material you
35
+ have the right to contribute under this project's [MIT license](LICENSE);
36
+ identify the origin and license of reused material in the pull request.
37
+ The repository does not currently enforce DCO sign-offs or require a CLA.
38
+ The decision on a formal contribution attestation mechanism is tracked in
39
+ [issue #99](https://github.com/buettgen-app/coverart-cli/issues/99); do not invent
40
+ sign-offs for other contributors or rewrite published history.
41
+
42
+ ## Development environment
43
+
44
+ Use a supported Python interpreter and the checked-in hash locks. The
45
+ [README development setup](README.md#development) gives the install, lint,
46
+ type-check and branch-coverage commands. On PowerShell, activate the virtual
47
+ environment with `.\.venv\Scripts\Activate.ps1` instead of the POSIX activation
48
+ command, or invoke its Python executable directly.
49
+
50
+ Install FFmpeg for the audio-stream preservation tests. Run the full suite before
51
+ submitting a product change; use a targeted `pytest tests/test_<component>.py`
52
+ run while iterating. Native Windows tests need Windows and macOS metadata tests
53
+ need macOS. A successful Linux run cannot substitute for those CI jobs.
54
+ Missing or skipped required checks do not count as passing.
55
+
56
+ ## Coding style and test expectations
57
+
58
+ - Python follows [PEP 8](https://peps.python.org/pep-0008/) with the repository's
59
+ explicit 100-character line length and Ruff formatter. The checked-in
60
+ `pyproject.toml` is authoritative for Ruff rules and supported syntax.
61
+ - Run `ruff check .`, `ruff format --check .` and `pyrefly check`. Preserve
62
+ compatibility with the documented Python minimum; a newer development
63
+ interpreter does not authorize newer-only runtime syntax or APIs.
64
+ - Keep boundary checks explicit and failure behavior testable. Retain the
65
+ no-follow filesystem protections, copy-on-write metadata preservation,
66
+ network/image budgets and HTML/CSV injection defenses.
67
+ - Add offline, deterministic tests using synthetic data. Provider tests should
68
+ mock transport responses rather than depend on live catalogs or API keys.
69
+ Exercise success, rejection and cleanup when the change affects a boundary.
70
+ - Treat warnings as findings to investigate. Do not add broad warning filters,
71
+ blanket lint/type suppressions, weakened coverage floors or exclusions to make
72
+ a change pass. A necessary narrow exception needs a reason and review.
73
+ - Preserve all platform coverage reports and the
74
+ [coverage policy](docs/repository-checks.md#test-coverage). Coverage is evidence
75
+ of executed paths, not proof that assertions are sufficient.
76
+
77
+ Documentation-only changes need relevant example, link and consistency checks;
78
+ do not add tests that merely assert the exact wording of prose. CI still applies
79
+ the repository's required checks.
80
+
81
+ ## Review and acceptance
82
+
83
+ Review the final diff for usefulness, correctness, backwards compatibility,
84
+ maintainability, privacy, trust boundaries and test quality. For filesystem,
85
+ network, media or release changes, inspect the relevant failure/race paths as
86
+ well as the successful path. Follow the
87
+ [component review and gauntlet](docs/repository-checks.md#component-review-and-gauntlet)
88
+ and record findings with a concrete trigger and expected result.
89
+
90
+ A pull request is ready for integration only when its applicable checks pass on
91
+ the final head, actionable findings are resolved with evidence, documentation
92
+ matches behavior and all configured repository protections are satisfied.
93
+ Unreachable checks and outstanding requested reviews remain open. Maintainers
94
+ use normal protected merges; contributors must not bypass checks or force-push
95
+ `main`. Version metadata, release tags and publication belong to the automatic
96
+ release process.
97
+
98
+ Distinguish an automated or AI-assisted review from a human's review. Record the
99
+ reviewer, reviewed commit, scope and decision; do not assign a person's approval
100
+ to a bot's output. The OpenSSF Gold goal of human review by someone other than
101
+ the author for at least half of proposed modifications needs actual pre-release
102
+ history. [Issue #98](https://github.com/buettgen-app/coverart-cli/issues/98) tracks
103
+ that evidence and reviewer availability; this policy does not claim that the
104
+ historical target has already been met.
105
+
106
+ ## Small tasks for new contributors
107
+
108
+ These are bounded ways to contribute to the open documentation work in
109
+ [issue #100](https://github.com/buettgen-app/coverart-cli/issues/100). Comment on
110
+ the issue before starting so another contributor does not duplicate your work:
111
+
112
+ - **PowerShell quick-start check:** follow the README with the current published
113
+ package and a disposable synthetic library. Report the Python/Windows/package
114
+ versions, exact failing command if any, and a minimal documentation correction.
115
+ Do not use a personal library as a test fixture.
116
+ - **Keyboard report check:** generate a report with `docs/make_demo_report.py`
117
+ and check tab focus, search, filters and theme controls without a mouse.
118
+ Record reproducible problems and propose one small fix; preserve report
119
+ escaping and keep personal data out of screenshots.
120
+ - **Screen-reader report check:** inspect the same synthetic report's controls
121
+ and coverage status using a screen reader. Report missing names or ambiguous
122
+ status in one control at a time, including browser and assistive-technology
123
+ versions.
124
+
125
+ The [architecture](docs/architecture.md) explains where changes belong, and the
126
+ [roadmap](docs/roadmap.md) describes the intended direction. The
127
+ [governance document](docs/governance.md) identifies the current maintainer and
128
+ which continuity and reviewer roles still need to be filled.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: coverart-cli
3
- Version: 0.7.2
3
+ Version: 0.7.4
4
4
  Summary: Fetch missing album covers from Last.fm, iTunes, Deezer, MusicBrainz; embed in MP3/M4A/FLAC/Ogg and write a cover.jpg sidecar
5
5
  Project-URL: Homepage, https://github.com/buettgen-app/coverart-cli
6
6
  Project-URL: Repository, https://github.com/buettgen-app/coverart-cli
@@ -60,7 +60,7 @@ artwork is reused where possible.
60
60
 
61
61
  [Quick start](#quick-start) · [Workflows](#common-workflows) ·
62
62
  [Configuration](#configuration) · [Reports](#html-report) ·
63
- [Development](#development) · [Changelog](CHANGELOG.md)
63
+ [Development](#development) · [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)
64
64
 
65
65
  ## Install
66
66
 
@@ -82,6 +82,7 @@ coverart --version
82
82
  ```
83
83
 
84
84
  Upgrade with `pipx upgrade coverart-cli` or `uv tool upgrade coverart-cli`.
85
+ Uninstall with `pipx uninstall coverart-cli` or `uv tool uninstall coverart-cli`.
85
86
  PyPI contains the latest published release; this README also documents repository
86
87
  changes that may be awaiting release.
87
88
 
@@ -92,9 +93,7 @@ Install Python 3.15 (recommended; 3.11+ supported) and pipx, then open a new Pow
92
93
  ```powershell
93
94
  py -m pip install --user pipx
94
95
  py -m pipx ensurepath
95
- # Until the next PyPI release, install the Windows implementation from main
96
- # (requires Git for Windows):
97
- pipx install "git+https://github.com/buettgen-app/coverart-cli.git@main"
96
+ pipx install coverart-cli
98
97
  coverart --version
99
98
  coverart "$env:USERPROFILE\Music" --dry-run -v
100
99
  coverart "$env:USERPROFILE\Music"
@@ -310,6 +309,11 @@ print(stats.fetched_from, stats.not_found, stats.errors)
310
309
 
311
310
  ## Development
312
311
 
312
+ Read the [contribution guide](CONTRIBUTING.md) for the pull-request process,
313
+ coding style, test policy and review requirements. The
314
+ [architecture](docs/architecture.md) describes component boundaries; the
315
+ [roadmap](docs/roadmap.md) sets the direction through October 2027.
316
+
313
317
  Dependency updates are configured through [Renovate](docs/dependency-updates.md),
314
318
  including Python hash locks, GitHub Actions and pre-commit hooks.
315
319
 
@@ -343,7 +347,7 @@ Test coverage measures executed code, separately from the report's album-art
343
347
  coverage. **Line coverage** counts executed statements; **branch coverage** checks
344
348
  both outcomes of decisions, including failures and rejected inputs. Neither proves
345
349
  that a test asserts the right behavior or that the program has no vulnerabilities.
346
- CI requires at least 90% lines and 78% branches for shared code, with a separate
350
+ CI requires at least 90% lines and 80% branches for shared code, with a separate
347
351
  native Windows measurement. Download `coverage-*` artifacts from a CI run and open
348
352
  `html/index.html` to see missed lines and branches. See the
349
353
  [coverage policy](docs/repository-checks.md#test-coverage) for scopes and gates.
@@ -20,7 +20,7 @@ artwork is reused where possible.
20
20
 
21
21
  [Quick start](#quick-start) · [Workflows](#common-workflows) ·
22
22
  [Configuration](#configuration) · [Reports](#html-report) ·
23
- [Development](#development) · [Changelog](CHANGELOG.md)
23
+ [Development](#development) · [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)
24
24
 
25
25
  ## Install
26
26
 
@@ -42,6 +42,7 @@ coverart --version
42
42
  ```
43
43
 
44
44
  Upgrade with `pipx upgrade coverart-cli` or `uv tool upgrade coverart-cli`.
45
+ Uninstall with `pipx uninstall coverart-cli` or `uv tool uninstall coverart-cli`.
45
46
  PyPI contains the latest published release; this README also documents repository
46
47
  changes that may be awaiting release.
47
48
 
@@ -52,9 +53,7 @@ Install Python 3.15 (recommended; 3.11+ supported) and pipx, then open a new Pow
52
53
  ```powershell
53
54
  py -m pip install --user pipx
54
55
  py -m pipx ensurepath
55
- # Until the next PyPI release, install the Windows implementation from main
56
- # (requires Git for Windows):
57
- pipx install "git+https://github.com/buettgen-app/coverart-cli.git@main"
56
+ pipx install coverart-cli
58
57
  coverart --version
59
58
  coverart "$env:USERPROFILE\Music" --dry-run -v
60
59
  coverart "$env:USERPROFILE\Music"
@@ -270,6 +269,11 @@ print(stats.fetched_from, stats.not_found, stats.errors)
270
269
 
271
270
  ## Development
272
271
 
272
+ Read the [contribution guide](CONTRIBUTING.md) for the pull-request process,
273
+ coding style, test policy and review requirements. The
274
+ [architecture](docs/architecture.md) describes component boundaries; the
275
+ [roadmap](docs/roadmap.md) sets the direction through October 2027.
276
+
273
277
  Dependency updates are configured through [Renovate](docs/dependency-updates.md),
274
278
  including Python hash locks, GitHub Actions and pre-commit hooks.
275
279
 
@@ -303,7 +307,7 @@ Test coverage measures executed code, separately from the report's album-art
303
307
  coverage. **Line coverage** counts executed statements; **branch coverage** checks
304
308
  both outcomes of decisions, including failures and rejected inputs. Neither proves
305
309
  that a test asserts the right behavior or that the program has no vulnerabilities.
306
- CI requires at least 90% lines and 78% branches for shared code, with a separate
310
+ CI requires at least 90% lines and 80% branches for shared code, with a separate
307
311
  native Windows measurement. Download `coverage-*` artifacts from a CI run and open
308
312
  `html/index.html` to see missed lines and branches. See the
309
313
  [coverage policy](docs/repository-checks.md#test-coverage) for scopes and gates.
@@ -0,0 +1,167 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a vulnerability
4
+
5
+ If you discover a security issue in `coverart-cli`, please **do not file a public issue**.
6
+ Instead, use GitHub's private vulnerability reporting:
7
+
8
+ - <https://github.com/buettgen-app/coverart-cli/security/advisories/new>
9
+
10
+ The acknowledgement target is 7 days. Include the affected version/platform,
11
+ reproduction steps, expected impact and a minimal synthetic sample where possible.
12
+ Do not attach a private music library, real API key or unrelated personal data.
13
+ If acknowledgement is overdue, follow up in the same private report. A public
14
+ issue asking the maintainer to check private reports may omit all vulnerability
15
+ details.
16
+
17
+ The application runs locally with the operator's privileges. Security concerns
18
+ include unintended file access or modification, malicious media or metadata,
19
+ unintended network requests, credential disclosure, unsafe generated reports,
20
+ resource exhaustion and release supply-chain compromise. There is no project
21
+ production service whose isolation can protect a user's local machine.
22
+
23
+ ### Response and disclosure
24
+
25
+ The maintainer handling the private report is responsible for the following
26
+ steps, with a named owner recorded in the report:
27
+
28
+ 1. Acknowledge receipt, agree on a private communication channel and identify
29
+ affected/supported versions. Ask whether the reporter wants attribution.
30
+ 2. Reproduce with synthetic data, assess impact, prerequisites, severity and
31
+ exploitability, and record the assessment. An unreproduced report stays open
32
+ for investigation; lack of an accessible scan does not establish safety.
33
+ 3. Agree on next actions and a disclosure plan with the reporter. Prioritize
34
+ critical issues promptly, give progress updates when the assessment or plan
35
+ changes, and reassess if exploitation is reported. Track publicly known
36
+ medium-or-higher vulnerabilities so they do not remain unpatched beyond
37
+ 60 days; this is a remediation policy, not a claim about historical results.
38
+ 4. Prepare the correction privately when disclosure would expose users. Add an
39
+ appropriate regression, review the change and run the applicable platform,
40
+ security and release checks. Coordinate upstream dependency fixes if needed;
41
+ a rejected exploitability claim needs a documented technical reason.
42
+ 5. Publish the fix through the existing protected release process. Publish an
43
+ advisory with affected/fixed versions, impact, mitigations and available
44
+ CVE/GHSA identifiers; include applicable identifiers in release notes.
45
+ Credit consenting reporters and collaborators, respecting anonymity.
46
+ 6. Verify the published artifacts and link the fix, tests, release and advisory
47
+ in the report before closure. Record remaining work and update security
48
+ documentation if the trust boundary or supported behavior changed.
49
+
50
+ Use [GitHub repository security advisories](https://docs.github.com/en/code-security/concepts/vulnerability-reporting-and-management/repository-security-advisories)
51
+ for private coordination and public disclosure. Publication timing must account
52
+ for user exposure and reporter coordination; an acknowledgement is not a
53
+ guarantee of a fix by a particular date.
54
+
55
+ Response timing, reporter credit, open findings and remediation history must be
56
+ checked against actual authorized records. This policy does not attest that no
57
+ private reports or unresolved vulnerabilities exist.
58
+
59
+ ## Security requirements and operating assumptions
60
+
61
+ The [security assurance case](docs/security-assurance.md) maps the requirements
62
+ to implementation, tests and limitations. It is engineering documentation
63
+ pending human security review, not a badge or an independent audit.
64
+
65
+ The filesystem boundary assumes that no other process with the same user
66
+ permissions concurrently moves or renames the selected library while a write
67
+ run is active. The CLI authorizes directory objects reached through
68
+ root-anchored, no-follow traversal; POSIX renames do not revoke already-open
69
+ directory descriptors. Symlink and hard-link aliases are handled defensively,
70
+ but same-user concurrent filesystem reorganization is outside the threat model.
71
+ Native Windows writes additionally require the destination directory owner and
72
+ namespace/policy writers to be the effective user, SYSTEM or local Administrators.
73
+ The CLI refuses broader or unrecognized write grants before staging and checks
74
+ again before committing. This excludes lower-trust directory writers from racing
75
+ destination metadata checks; concurrent namespace or ACL changes by these trusted
76
+ actors remain outside the boundary. Read-only operations do not require this guard.
77
+
78
+ Choose a trusted working directory and review all configuration files:
79
+ `coverart.toml` in the current directory can select write behavior and report
80
+ destinations. Config files, the Python runtime, installed plugins/custom Python
81
+ providers and an explicitly supplied report template are trusted inputs.
82
+ The HTML and CSV output paths are operator-selected destinations; they do not
83
+ have the music-library writer's handle/ACL boundary. Use a private output
84
+ directory that untrusted users cannot modify.
85
+
86
+ Album/artist names are sent to enabled providers. Generated reports, CSV files
87
+ and logs can contain library names, album identities, paths and artwork.
88
+ They are not anonymous exports. Inspect them before sharing; `--report-only`
89
+ avoids provider requests, and `--no-thumbs` omits report artwork.
90
+
91
+ ### API credentials
92
+
93
+ Last.fm is optional. Keep its key out of shared configuration, command history
94
+ and committed files. A separate TOML file containing only `lastfm_key` can be
95
+ supplied with `--config /path/to/private-secrets.toml`; other defaults continue
96
+ to come from the normal configuration files. Restrict that file and its parent
97
+ directory to your account (for example, owner-only permissions on POSIX or an
98
+ appropriate Windows ACL). The CLI does not set or audit those permissions.
99
+
100
+ The key can be replaced in that file without changing code. `LASTFM_API_KEY`
101
+ overrides configuration, and an explicit `--lastfm-key` overrides both; clear
102
+ stale overrides when rotating a key. Environment variables remain visible to
103
+ processes with sufficient local privileges. The tool redacts query strings,
104
+ fragments and URL user information in its provider URL logging, but this is
105
+ not a guarantee that arbitrary logs or external tooling contain no secrets.
106
+
107
+ ## Supported versions
108
+
109
+ Only the latest minor release is supported with fixes.
110
+
111
+ ## Dependencies
112
+
113
+ Runtime dependencies are `mutagen` for audio metadata and Pillow for bounded
114
+ JPEG/PNG decoding. Build, CI, fuzzing, and attestation tools use hash-locked
115
+ requirements files. Dependency vulnerabilities are tracked via GitHub's Dependabot.
116
+ CI regenerates every build, development, fuzzing and attestation lock with the
117
+ pinned uv version and fails if the checked-in files differ.
118
+
119
+ Provider requests and redirects permit only each provider's configured HTTPS
120
+ hosts on the standard HTTPS port. HTTP headers and bodies share a deadline
121
+ enforced at every underlying socket read, including chunk framing; responses
122
+ also have a byte cap. DNS and connection establishment are outside that response
123
+ deadline and retain the transport's connection-timeout behavior. Oversized Ogg picture blocks
124
+ are rejected before base64 allocation, and oversized covers bypass cache hashing.
125
+
126
+ Test coverage is measured separately for shared code and the native Windows
127
+ backend, with required line/branch gates and downloadable reports. Coverage
128
+ is evidence of executed paths, not certification of security; see the
129
+ [coverage policy](docs/repository-checks.md#test-coverage).
130
+
131
+ ## Repository privacy
132
+
133
+ Tracked files are checked for non-example contact addresses, personal home paths,
134
+ local artifacts and screenshot metadata. Secret scanning uses fully redacted
135
+ Gitleaks output for PR commits and reachable Git history. These are focused
136
+ regression checks; they do not certify that arbitrary content contains no PII.
137
+ See [repository hygiene and CI gates](docs/repository-checks.md) for coverage,
138
+ synthetic examples, and the distinction between file content and historical
139
+ Git author/committer identities.
140
+
141
+ ## Supply chain controls
142
+
143
+ Security and supply chain integrity are release blockers for this repository.
144
+
145
+ - Repository Actions default token permissions are read-only. Workflows opt in
146
+ to write or OIDC permissions only at the job that needs them.
147
+ - Dependency Review runs on pull requests and fails when new runtime,
148
+ development, or unknown-scope dependencies introduce moderate-or-higher
149
+ vulnerabilities.
150
+ - OpenSSF Scorecard runs on `main`, on a weekly schedule, and on demand. Results
151
+ are uploaded to code scanning and published to Scorecard's public API.
152
+ - Every third-party GitHub Action is pinned to a full commit SHA. Zizmor audits
153
+ the workflows as a required pull-request check.
154
+ - PyPI publishing uses Trusted Publishing with build attestations. Release jobs
155
+ publish only after Release Please creates a GitHub Release/tag, the tagged
156
+ source passes Ruff, Pyrefly, and the full test suite on all supported Python
157
+ versions, and the built wheel passes a clean installation smoke test.
158
+ - PyPI trust is bound to `.github/workflows/release.yml` and the protected
159
+ `pypi` environment; the workflow filename is part of the publisher identity.
160
+ - Verified low-risk Dependabot updates use native auto-merge only after branch
161
+ protection passes; major and production minor updates stay manual. Release
162
+ preparation uses the repository-scoped workflow `GITHUB_TOKEN`; no
163
+ publishing token or private GitHub App key is stored. The repository-scoped
164
+ `RELEASE_SETTINGS_TOKEN` has Administration(read) access only and verifies
165
+ immutable-release settings and tag protection. Release Please dispatches the
166
+ separately validated `release.yml` workflow after creating a mutable draft;
167
+ the publication workflow verifies and finalizes it before PyPI publishing.
@@ -0,0 +1,121 @@
1
+ # Architecture
2
+
3
+ `coverart-cli` is a local Python command-line application. It discovers albums,
4
+ obtains missing artwork and writes audio tags and/or an album-folder sidecar.
5
+ A separate reporting path reads the library and produces a self-contained HTML
6
+ file. There is no project-operated server, account system or background service.
7
+
8
+ ## Components and dependencies
9
+
10
+ | Component | Responsibility |
11
+ | --- | --- |
12
+ | [`cli.py`](../src/coverart_cli/cli.py) | Parse options, merge configuration, validate the selected mode/platform, construct providers, run processing/reporting and return exit codes. |
13
+ | [`config.py`](../src/coverart_cli/config.py) | Read optional TOML defaults and reject unknown or invalidly typed settings. |
14
+ | [`core.py`](../src/coverart_cli/core.py) | Discover album targets, verify their identities, coordinate bounded concurrent processing, choose local/provider artwork and collect results/CSV misses. |
15
+ | [`providers/`](../src/coverart_cli/providers) | Query Last.fm, iTunes, Deezer and MusicBrainz/Cover Art Archive behind a common `CoverProvider` interface. |
16
+ | [`tagging.py`](../src/coverart_cli/tagging.py) | Read tags, validate JPEG/PNG covers with Pillow, inspect existing artwork, and use Mutagen for format-specific tag edits through staged writes. |
17
+ | [`filesystem.py`](../src/coverart_cli/filesystem.py) | Provide the common file-operation interface using POSIX operations or the native Windows backend. |
18
+ | [`_windows_filesystem.py`](../src/coverart_cli/_windows_filesystem.py) | Implement native handle, reparse-point, ACL, stream and metadata protections on supported local NTFS volumes. |
19
+ | [`report.py`](../src/coverart_cli/report.py) and [`templates/report.html`](../src/coverart_cli/templates/report.html) | Scan verified album targets, bound thumbnails, serialize report data safely and render searchable local HTML. |
20
+
21
+ The CLI imports processing and provider interfaces. Core and report scanning
22
+ share target discovery/reopening and tagging helpers; reporting does not call
23
+ providers. Tagging delegates platform-dependent file operations to the filesystem
24
+ adapter. Runtime dependencies are Mutagen and Pillow; TOML, HTTP, concurrency and
25
+ report serialization use Python's standard library. Development/release tools are
26
+ separate hash-locked dependencies described in
27
+ [dependency updates](dependency-updates.md).
28
+
29
+ ## Processing flow
30
+
31
+ ```text
32
+ CLI + TOML + environment
33
+ |
34
+ validated options
35
+ |
36
+ root-anchored album discovery
37
+ |
38
+ verified album + audio metadata
39
+ |
40
+ local sidecar, else enabled providers in order
41
+ |
42
+ bounded JPEG/PNG validation
43
+ |
44
+ audio copy-on-write / sidecar staging
45
+ |
46
+ result summary + optional misses CSV
47
+ |
48
+ optional independent report scan
49
+ ```
50
+
51
+ Defaults are overridden in order by user TOML, working-directory TOML, an
52
+ explicit config file, the Last.fm environment key and explicit CLI flags. The
53
+ CLI remembers which flags were supplied, so an explicitly selected default still
54
+ overrides a config value. Configuration files are user-controlled inputs, not a
55
+ source of executable plugins.
56
+
57
+ Discovery records directory identities and relative paths. Processing reopens
58
+ each target from the chosen root and checks that it still identifies the intended
59
+ directory. Hidden entries, symbolic links and unsupported entries are skipped.
60
+ A directly selected root containing conflicting album identities is rejected.
61
+ Readable album tags take precedence over optional directory-name fallback.
62
+
63
+ Each album first checks which requested outputs already meet its thresholds.
64
+ A validated local sidecar can supply missing embeds without a provider download.
65
+ Otherwise, enabled providers are tried sequentially for that album: Last.fm
66
+ (when configured), iTunes, Deezer and MusicBrainz. Different albums can run in a
67
+ thread pool; at most three times the worker count are submitted at once.
68
+ Provider implementations apply their rate limits, and shared statistics are
69
+ updated under a lock.
70
+
71
+ The shared HTTP helper validates permitted HTTPS hosts/ports, rechecks redirects,
72
+ bounds responses and applies a response-read deadline. DNS and connection setup
73
+ have transport timeouts rather than that response deadline. Downloaded and local
74
+ image bytes pass dimension, decoded-format and size checks before use. Artwork
75
+ validation results may be cached within a run.
76
+
77
+ Audio changes occur on a staged copy, retaining supported file/tag metadata before
78
+ atomic replacement. Source and destination identities are checked around file
79
+ operations. Sidecars are likewise staged and replaced. Each format has a small
80
+ Mutagen adapter for its artwork field; image format determines sidecar extension.
81
+ Failures are recorded without treating missing catalog artwork as a processing
82
+ error. CSV cells with formula-like prefixes are escaped.
83
+
84
+ ## Reporting and modes
85
+
86
+ Report-only mode skips provider construction and network fetching. The report
87
+ scanner reuses verified target discovery but does not modify audio or covers.
88
+ It measures whether an album has a usable sidecar **or** artwork in every supported
89
+ track. Processing completion requires every requested output, so these two
90
+ counts intentionally answer different questions.
91
+
92
+ Thumbnails use local sidecars with per-image and shared report budgets. The
93
+ report serializes album data to JSON while escaping HTML raw-text delimiters;
94
+ the browser template presents that data with safe DOM operations. Reports contain
95
+ album/artist names and optional artwork and should be reviewed before sharing.
96
+ Report output uses a temporary file and replacement. CSV and HTML output paths
97
+ are explicitly selected by the user and are distinct from library write targets.
98
+
99
+ Dry-run mode still queries providers and validates downloaded artwork; it does
100
+ not write tags or sidecars. The CLI rejects combining dry runs with report/CSV
101
+ output. Report-only is the local inspection mode when network access is unwanted.
102
+
103
+ ## Boundaries and validation
104
+
105
+ The filesystem guarantees depend on the supported platform and the selected
106
+ root; they do not protect against all actions by another process with the same
107
+ trusted identity. Windows additionally checks supported volumes, handles and
108
+ directory ACLs. Read the precise assumptions in [SECURITY.md](../SECURITY.md) and
109
+ the [security assurance case](security-assurance.md).
110
+
111
+ Tests are organized by component and by failure boundary in [`tests/`](../tests).
112
+ Linux/Python, macOS and native Windows CI exercise their applicable behavior.
113
+ Coverage, fuzzing, static analysis and dependency checks provide different kinds
114
+ of evidence; none establishes that all defects have been found. See
115
+ [repository checks](repository-checks.md) for the enforced scopes.
116
+
117
+ Packaging uses Hatchling to produce a wheel and source distribution. The
118
+ automatic release pipeline handles version metadata, protected integration,
119
+ immutable releases, PyPI publication and provenance verification. Its state
120
+ transitions and recovery rules are documented separately in
121
+ [releases.md](releases.md).