rob-9 opened a new pull request, #1005:
URL: https://github.com/apache/flink-agents/pull/1005

   ### Purpose of change
   
   Closes #1003.
   
   Remote skill archives are trusted instructions and code: their `SKILL.md` 
content is consumed by the agent, and bundled scripts can become executable 
through the built-in tools. Until now, `Skills.fromUrl(...)` / 
`Skills.from_url(...)` accepted plain HTTP and extracted whatever arrived, 
without verifying an operator-provided integrity expectation.
   
   This change makes URL skill sources secure by default and adds optional 
integrity verification across the Java, Python, and YAML surfaces.
   
   - Reject plain HTTP URL skill sources by default; HTTPS is required.
   - Keep plain HTTP available only through explicitly named unsafe factory 
methods or the `allow_insecure_http` YAML option.
   - Let operators pin an expected SHA-256 digest, which is verified against 
the downloaded archive before extraction.
   - Enforce the transport and digest rules again at runtime, so sources 
arriving through plan serialization or YAML cannot bypass API-level validation.
   - Fail with a clear error on unsupported cross-protocol redirects and clean 
up temporary archives on every failure path.
   - Add a structured YAML `url_sources` list while preserving the existing 
`urls` shorthand for unpinned HTTPS sources.
   - Keep Java and Python aligned on configuration, security behavior, tests, 
documentation, and generated YAML schemas.
   
   Existing direct and same-protocol-redirecting HTTPS sources are unaffected. 
Existing plain HTTP sources must now opt in explicitly.
   
   ### Tests
   
   - Targeted Java API tests: 31 passed.
   - Targeted Java runtime tests: 38 passed.
   - Python tests covering the changed API, YAML package, and runtime skill 
paths: 151 passed.
   - Java/Python agent-plan cross-language tests: 9 passed, 1 skipped.
   - Java Spotless check passed.
   - Ruff passed on the changed code; the six remaining reported violations are 
pre-existing and unrelated. 
   - YAML schema consistency verified, including both generated schema copies 
and the updated contract blob hash.
   - Apache RAT license check passed.
   
   ### API
   
   Yes. The Java and Python skill factories now reject plain HTTP by default 
and add aligned methods for SHA-256 pinning and explicit HTTP opt-in:
   
   - Java: `fromUrlWithSha256`, `fromUrlUnsafe`, and `fromUrlUnsafeWithSha256`.
   - Python: `from_url_with_sha256`, `from_url_unsafe`, and 
`from_url_unsafe_with_sha256`.
   
   YAML gains a structured `url_sources` list whose entries accept `url`, 
optional `sha256`, and optional `allow_insecure_http`. The existing `urls` list 
remains available for ordinary HTTPS sources.
   
   ### Documentation
   
   - [ ] `doc-needed`
   - [ ] `doc-not-needed`
   - [x] `doc-included`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   - [x] Yes
   - [ ] No
   
   Generated-by: OpenAI Codex (GPT-5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to