oscerd opened a new pull request, #23010:
URL: https://github.com/apache/camel/pull/23010

   # Description
   
   Upgrade the bundled OCSF (Open Cybersecurity Schema Framework) schemas in 
`camel-ocsf` from 1.7.0 to 1.8.0, regenerating the JSON schemas and the POJOs 
derived from them via `jsonschema2pojo`.
   
   JIRA: [CAMEL-23418](https://issues.apache.org/jira/browse/CAMEL-23418)
   
   # Changes
   
   - **Schemas regenerated** from OCSF 1.8.0 — every file in 
`components/camel-ocsf/src/main/resources/schema/` now references 
`https://schema.ocsf.io/1.8.0/...` and reflects 1.8.0 attributes.
   - **`Packet.json` and `Token.json` added** — OCSF 1.8.0 introduces a 
`packet` reusable object that is referenced from every network activity class 
(`network_activity.packet_list`, `dns_activity.packet_list`, etc.), and a 
`token` object referenced from `api.token`. Adding them to 
`OBJECTS_TO_GENERATE` and `PROPERTY_TO_OBJECT_MAP` produces proper top-level 
POJOs and `$ref` links instead of inline anonymous types.
   - **`generate-ocsf-schemas.py`**:
     - Default `--version` bumped from `1.7.0` to `1.8.0`.
     - New `load_ocsf_schema()` falls back to downloading the schema export 
from 
`https://schema.ocsf.io/{version}/export/schema?profiles=&extensions=win,linux,macos`
 when the requested version is not bundled inside the `ocsf-json-schema` Python 
package. This is required today because PyPI `ocsf-json-schema 1.1.0` only 
bundles up to 1.7.0.
   - **`OcsfConstants.SCHEMA_VERSION`** updated from `1.7.0` to `1.8.0`. All 
existing OCSF event class UIDs are unchanged between 1.7.0 and 1.8.0, so no 
other constants needed updating.
   - **Docs** (`ocsf-dataformat.adoc`): version references and object count (68 
→ 70) refreshed; `Packet` and `Token` listed in the object summary; a NOTE was 
added about the new download fallback.
   - **Tests** (`OcsfEventExampleTest`, `ocsf-detection-finding-example.json`): 
version strings in test fixtures and explanatory comments updated from `1.7.0` 
to `1.8.0`. Behavior is unchanged (attacks remain on `FindingInfo` in 1.8.0).
   
   # Verification
   
   - `mvn clean test` in `components/camel-ocsf` — all 8 tests pass.
   - `mvn clean install -DskipTests -pl :camel-ocsf -am` from the repo root — 
BUILD SUCCESS.
   - `git grep -n 1\\.7\\.0 components/camel-ocsf/` returns no matches 
(confirming nothing was missed).
   - Class UIDs were diffed between 1.7.0 (bundled) and 1.8.0 (downloaded) — no 
UID changes.
   
   # Note on the schema download fallback
   
   The fallback uses the public `schema.ocsf.io` export endpoint and runs only 
at generator time (a developer step), not at component build time. The Maven 
build still consumes the committed JSON schemas, so it remains fully offline. 
As soon as `ocsf-json-schema` ships a release that bundles 1.8.0, the fallback 
will simply not fire.
   
   ---
   
   _Claude Code on behalf of Andrea Cosentino_


-- 
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