8 Commits

Author SHA1 Message Date
Sam Dornan
3399c736e7 fix(tests): redact provider credentials when recording VCR cassettes (#4886)
* fix(tests): scrub ScreenScraper dev credentials from VCR cassettes

ScreenScraper echoes the full request URL, credentials included, back in
its JSON (the header's commandRequested and every media URL). The VCR
config had no filters, so four cassettes carried the real devid and
devpassword in plain text.

vcr_config now masks every key in SENSITIVE_KEYS: filter_query_parameters
for request URIs and a before_record_response hook for response bodies.
The existing cassettes are scrubbed with the same 30-x placeholder the
ssid/sspassword and OAuth cassettes already use, and a guard test fails
if any cassette still holds a credential.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(tests): give the VCR scrub helper a typed return for strict mypy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(tests): redact credential headers when recording VCR cassettes

vcr_config now also passes SENSITIVE_KEYS to filter_headers, so a
re-record with a real IGDB or SteamGridDB key no longer commits its
Authorization or Client-ID header. The existing Authorization values
were fake test tokens; they now hold the shared placeholder, and a
guard test checks every cassette's request headers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(tests): match credential keys in VCR bodies case-insensitively

SENSITIVE_KEYS_REGEX and strip_sensitive_query_params already ignore
case; the body scrubber now does too, so an echoed SSID= or
DEVPASSWORD= is masked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 12:47:41 -05:00
DevYukine
cd7ddb253c chore(playmatch): move integration to API v2 endpoints 2026-07-03 01:55:32 +02:00
zurdi
0780c3820b chore: update package dependencies and configurations
- Added "esbuild" version "^0.28.1" to frontend package overrides.
- Updated "exclude-newer-package" in pyproject.toml to include "vcrpy" with a date of "2026-06-17".
- Modified uv.lock to reflect the new "vcrpy" version "8.2.1" and removed platform-specific markers for dependencies.
2026-06-17 01:27:08 +02:00
zurdi
ab637203ac Merge branch 'master' into feat/rom-filter-multivalue 2025-12-24 12:39:45 +00:00
zurdi
c1d43f67f8 Refactor ROM retrieval to support multi-value platform filtering across various handlers and endpoints 2025-11-27 22:52:33 +00:00
Georges-Antoine Assi
5018896396 Fix scan_rom tests 2025-11-26 15:54:12 -05:00
Michael Manganiello
b2ea84b5bb misc: Create IGDB service adapter
Add a new service adapter for the IGDB API, to separate concerns with
RomM's handler for metadata. This adapter is agnostic to the handler and
only provides methods to interact with the API, and correctly return
typed responses.

The API authorization was also improved to not rely on decorating each
method that makes requests, but instead using an `aiohttp` middleware
to automatically add the required headers to each request.

Utils `mark_expanded` and `mark_list_expanded` where added to help
narrow the types of IGDB's expandable fields when we know they are
expanded, for `mypy` type checking.
2025-08-30 20:21:15 -03:00
Michael Manganiello
ba21cbc1e1 misc: Separate tests folder from backend code
Create separate `tests/` folder for all tests. This will also simplify
not copying tests code into the Docker image.
2025-08-08 12:49:13 -03:00