Skip to content

Security annotation models and security findings / posture reports (Egeria 6.3) - #495

Merged
dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:feature/security-annotations
Oct 27, 2026
Merged

dwolfson merged 2 commits into
odpi:mainfrom
dwolfson:feature/security-annotations

Conversation

@dwolfson

Copy link
Copy Markdown
Member

Summary

Step 3 of the pyegeria/Dr.Egeria support asked for in odpi/egeria-workspaces#702 (design-docs/HANDOFF_pyegeria_security_annotations.md). It covers the security annotation types Egeria 6.3 adds for security test results (model 0665).

  • Models: AnnotationProperties, ResourceMeasureAnnotationProperties, SecurityFindingAnnotationProperties, VulnerabilityAnnotationProperties, PenetrationTestFindingAnnotationProperties and SecurityPostureAnnotationProperties. Field names are checked against the Java properties classes. Severity is limited to the CVSS ratings and the CVSS score to 0–10.
  • Fix: DataDiscovery's own AnnotationProperties was never used and named a field confidence_level, where Egeria's field is confidence. It now re-exports the shared model, so existing imports keep working.
  • DataDiscovery.get_security_findings: the findings for one survey report, or for one element through AssociatedAnnotation, sorted by CVSS score with the highest first. Optional filters are min_severity and finding_types, and the report or element can be given as a GUID or a qualified name.
  • DataDiscovery.get_security_posture_history: one SecurityPostureAnnotation per run, oldest first. An optional report_qualified_name_prefix follows one system's series of reports.
  • Report specs: Security-Findings, Penetration-Test-Findings and Security-Posture.

Unset values Egeria reports as 0 or false

cvssScore, exploitAvailable, patchAvailable and the posture counts are Java primitives in Egeria. A finding where only the severity was set came back live with cvssScore: 0.0, exploitAvailable: false and patchAvailable: false. Shown as they are, those would read as "CVSS 0, no exploit, no patch" for something nobody assessed. So the report rows apply these rules:

  • A CVSS score of 0.0 is shown only when the severity is None, the rating that a score of 0.0 means.
  • Exploit Available and Patch Available are shown only when true.
  • If a run has 0 resources in scope, the count wasn't recorded, so both resource counts are left blank.
  • A severity missing from a recorded findingCountsBySeverity map counts as 0. If there's no map at all, every severity count is blank.

New and resolved finding counts of 0 still can't be told apart from unrecorded ones, and the Security-Posture description says so. Making these fields boxed types (Float, Boolean, Long) in Egeria would remove the ambiguity, so that's worth raising with the Egeria team.

Verification

  • Tested live against a quickstart running egeria-platform:latest (2026-10-26), using throwaway reports and annotations. I checked a sparse vulnerability, a fully populated vulnerability, a pen-test finding linked to an element, and two posture runs. All three specs ran through exec_report_spec, covering the per-report and per-element views, min_severity, prefix filtering and ordering. Everything was deleted afterwards, and each GUID was confirmed gone.
  • omvs_audit.py --service data-discovery: 25 OK, 0 mismatches, and no new findings.
  • 10 new micro-tests in test_security_annotations.py; the full micro-test suite passes (1522).

Not in this PR

  • Step 4: Dr.Egeria Survey Report, security finding and posture commands.
  • The optional create_security_finding convenience method. It fits naturally with the step 4 commands.

🤖 Generated with Claude Code

Egeria 6.3 (model 0665) adds annotation types for security test results
(odpi/egeria-workspaces#702 hand-off, step 3):

- Models: AnnotationProperties, ResourceMeasureAnnotationProperties,
  SecurityFindingAnnotationProperties, VulnerabilityAnnotationProperties,
  PenetrationTestFindingAnnotationProperties and
  SecurityPostureAnnotationProperties, field names checked against the Java
  properties classes. DataDiscovery's unused local AnnotationProperties
  (which used confidence_level instead of Egeria's confidence) now re-exports
  the shared model.
- DataDiscovery.get_security_findings (one report or one element, optional
  minimum severity and finding types, sorted by CVSS score) and
  get_security_posture_history (one row per run, oldest first, optional
  report qualified-name prefix). Report and element accept a GUID or
  qualified name.
- Report specs Security-Findings, Penetration-Test-Findings and
  Security-Posture.

Egeria stores cvssScore, exploitAvailable, patchAvailable and the posture
counts as Java primitives, so unset values come back as 0 / false (confirmed
live). The report rows leave those blank where a 0 or false would read as an
answer nobody gave, and the spec descriptions say so.

Verified against the 2026-10-26 egeria-platform:latest quickstart with
throwaway reports and annotations (since deleted).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson added a commit that referenced this pull request Oct 26, 2026
…0 / false when unset (#496)

Egeria's SecurityFinding/Vulnerability/SecurityPosture annotation properties
classes declare cvssScore, exploitAvailable, patchAvailable and the posture
counts as Java primitives, so an unset value is indistinguishable from 0 or
false (confirmed live 2026-10-26). Records the question for the Egeria team
(boxed types with a null default) and the pyegeria display workaround in
PR #495. Added to EGERIA_OPEN_ISSUES.md as well.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 8b97ba6 into odpi:main Oct 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant