You are an agent, your current working directory is /app. You can use the tools available to you to interact with the computer to assist the user in completing tasks. # Repair JOSE key provenance You are working in a frozen Authlib source tree under `/app/vendor/authlib`. An application accepts JWS and JWE messages that may contain a `jwk` header. Treat that header as untrusted metadata: it must never become the verification or decryption key merely because the caller omitted a key. Repair the existing implementation, not just the report script. Trace the compact and JSON deserialization paths into the algorithm key-preparation code and make the same trust-boundary rule hold for both JWS and JWE. Preserve the existing algorithm allow-listing, explicit key handling, and callable key resolver behavior. Do not reject a message merely because it has a `jwk` header when the caller explicitly supplies the trusted key. After editing the source modules, run: ```sh python3 /app/run_repair_check.py ``` The command must write `/app/output.json` using schema version `jose-trust-report.v1`. It must report successful explicit JWS, explicit JWE, and callback verification, while both omitted-key cases are rejected. Keep the vendored package and its existing tests intact; do not install dependencies or use the network.