OWASP / OWASP/openshield

feat: real drift history + detect repeated AZ-STOR-002 regressions as one campaign

Open
#264 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core enhancement priority: high stale
Dominant language
Python
Stars
57
Forks
68
Avg merge
3d 15h
Merged PRs (30d)
17

Description

What problem does this solve?

api/routes/drift.py::get_drift() only compares the latest scan against the previous one and
reports ADDED/REMOVED. A REMOVED finding is ambiguous — fixed, resource deleted, or just not
observed this scan are all indistinguishable today. That ambiguity makes it impossible to reliably
detect a recurring misconfiguration (e.g. four separate AZ-STOR-002 findings across production
storage accounts) as one process-level campaign instead of four unrelated tickets.

Describe the solution

Part A — drift history:

  • Persist security-relevant state changes per (rule_id, resource_id) across scans, not just a
    two-scan diff.
  • Distinguish REMOVED into FIXED (resource still present, now passing), DELETED (resource no
    longer in inventory), and NOT_OBSERVED (resource not covered by this scan's collection).
  • Record a detector/schema version alongside each change. Document a retention window — seeded
    changes should remain queryable past Azure's own 14-day Resource Graph Change Analysis window.

Part B — campaign detector, built on Part A:

  • Deterministic grouping: same rule ID, same resource scope (e.g. production tag), within a
    bounded time window → one campaign record with a timeline and evidence-quality indicator.
  • Ship a clean-control fixture proving the detector does NOT fire on unrelated findings that don't
    share rule/scope/window.
  • Recommend the preventive control (pipeline guardrail / Azure Policy) as campaign output instead
    of separate remediation tickets per finding.
  • Scope the demo to exactly this one case: AZ-STOR-002 recurrence.

Alternatives considered

Build generic cross-rule correlation from day one — rejected as too broad for a first demo; prove
the deterministic, explainable case first.

Additional context

Depends on issue 1 (rule evaluation persistence).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with api/routes/drift.py::get_drift() and review issue 1, which this work depends on. Define the persisted history and outcome distinctions for AZ-STOR-002, then scope the demo to its recurring findings. Done includes a clean-control fixture showing unrelated rule, scope, or time-window findings do not form a campaign.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
backend, cloud, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.