Skip to content

docs(#1807): update THREAT_MODEL.md for single-source trusted task architecture - #1810

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/1807-update-stale-threat-model
Open

docs(#1807): update THREAT_MODEL.md for single-source trusted task architecture#1810
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/1807-update-stale-threat-model

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Context

PR #1806 removed the data.trusted_task_rules direct input path from policy/lib/tekton/trusted.rego, consolidating all trusted task rule data through lib_rule_data("trusted_task_rules"). The THREAT_MODEL.md was not updated in that PR, leaving 6+ sections describing a trust boundary architecture that no longer exists.

Validation

  • grep -c 'data\.trusted_task_rules' THREAT_MODEL.md returns 0
  • grep -q 'lib_rule_data' THREAT_MODEL.md finds references to the new architecture
  • grep -c 'array\.concat' THREAT_MODEL.md returns 0
  • Section 3.3 describes the current single-source architecture
  • Threats DP-2 and LE-4 accurately describe the current threat surface

Closes #1807

Post-script verification

  • Branch is not main/master (agent/1807-update-stale-threat-model)
  • Secret scan passed (gitleaks — 4b089513609ae33616c01509cb0a0ccc5db4fb11..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

…chitecture

PR #1806 removed the data.trusted_task_rules input path from
lib/tekton/trusted.rego, eliminating the dual-source merge
that concatenated system-level rules with ruleData-level rules.
THREAT_MODEL.md still described the removed architecture in
multiple sections.

Updated sections:
- Section 3.3: rewritten to describe single-source flow through
  lib_rule_data("trusted_task_rules") with the standard 4-level
  precedence cascade
- Key table (line 135): clarified both trusted task keys flow
  exclusively through rule_data
- Threat DP-2: updated to reflect narrower injection surface
  through rule data precedence cascade
- Threat LE-4: removed stale concatenation-order concern
- Open question #3: reframed from merge-precedence to
  pattern-specificity interactions
- Recommendations #3 and #6: updated references to reflect
  single-source architecture

Closes #1807
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 13, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:54 PM UTC · Completed 2:08 PM UTC

Commit: 87c4a29 · View workflow run →

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unit-tests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

High

  • [Technical accuracy in documentation] THREAT_MODEL.md:135 — The parenthetical "(both flow exclusively through rule_data)" is factually incorrect for trusted_tasks. In policy/lib/tekton/trusted.rego, _trusted_tasks_data is defined as object.union(data.trusted_tasks, lib_rule_data("trusted_tasks")), meaning the legacy trusted_tasks key still has a direct data.trusted_tasks input path that is merged with the rule_data path. Only trusted_task_rules flows exclusively through lib_rule_data. This error misrepresents the trust boundary for the legacy system in a security-critical document.
    Remediation: Change the parenthetical to clarify that only trusted_task_rules flows exclusively through rule_data, while trusted_tasks still merges data.trusted_tasks with lib_rule_data("trusted_tasks"). For example: "(trusted_task_rules flows exclusively through rule_data; trusted_tasks merges data.trusted_tasks with rule data)".

  • [Technical accuracy in documentation] THREAT_MODEL.md:148 — Section 3.3 states "trusted_tasks and trusted_task_rules flow exclusively through lib_rule_data... There is no separate direct data.* input path for trusted task configuration." This is incorrect for trusted_tasks. The code shows _trusted_tasks_data := object.union(data.trusted_tasks, lib_rule_data("trusted_tasks")), meaning data.trusted_tasks is still a direct input path. The claim "There is no separate direct data.* input path" is only correct for trusted_task_rules, not for trusted_tasks. This overgeneralization in a threat model conceals a real input path that an attacker could potentially influence. See also: [Technical accuracy] finding at line 135.
    Remediation: Rewrite section 3.3 source description to distinguish between the two systems: trusted_task_rules flows exclusively through lib_rule_data (the 4-level precedence cascade), while trusted_tasks (the legacy system) is sourced from both data.trusted_tasks (OCI data bundles) and lib_rule_data("trusted_tasks"), merged via object.union. The trust boundary text should also be updated to describe both input paths for the legacy system.

Low

  • [Internal consistency] THREAT_MODEL.md:145 — The section heading was changed to remove data.trusted_tasks from the heading. While removing data.trusted_task_rules from the heading is correct (it no longer exists), data.trusted_tasks is still a valid input path used in the code. Fixing the high-severity body text errors would naturally lead to restoring this in the heading.

Labels: PR modifies only THREAT_MODEL.md — a documentation-only change


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.

Comment thread THREAT_MODEL.md
| Key | Effect if weakened |
|-----|---------------------|
| `trusted_tasks` / `trusted_task_rules` | Malicious task bundles treated as trusted |
| `trusted_tasks` / `trusted_task_rules` | Malicious task bundles treated as trusted (both flow exclusively through `rule_data`) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[high] Technical accuracy in documentation

The parenthetical '(both flow exclusively through rule_data)' is factually incorrect for trusted_tasks. In policy/lib/tekton/trusted.rego, _trusted_tasks_data is defined as object.union(data.trusted_tasks, lib_rule_data("trusted_tasks")), meaning the legacy trusted_tasks key still has a direct data.trusted_tasks input path that is merged with the rule_data path. Only trusted_task_rules flows exclusively through lib_rule_data. This error misrepresents the trust boundary for the legacy system in a security-critical document.

Suggested fix: Change the parenthetical to clarify that only trusted_task_rules flows exclusively through rule_data, while trusted_tasks still merges data.trusted_tasks with lib_rule_data("trusted_tasks").

Comment thread THREAT_MODEL.md
`quay.io/konflux-ci/tekton-catalog/data-acceptable-bundles`), merged with
ruleData-provided `trusted_tasks` / `trusted_task_rules`.
**Source**: `trusted_tasks` and `trusted_task_rules` flow exclusively through
`lib_rule_data` (see section 3.2 for the 4-level precedence cascade). There is

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[high] Technical accuracy in documentation

Section 3.3 states that trusted_tasks and trusted_task_rules flow exclusively through lib_rule_data with no separate direct data.* input path. This is incorrect for trusted_tasks. The code shows _trusted_tasks_data := object.union(data.trusted_tasks, lib_rule_data("trusted_tasks")), meaning data.trusted_tasks is still a direct input path. This overgeneralization in a threat model conceals a real input path that an attacker could potentially influence.

Suggested fix: Rewrite section 3.3 to distinguish between the two systems: trusted_task_rules flows exclusively through lib_rule_data, while trusted_tasks (legacy) is sourced from both data.trusted_tasks and lib_rule_data("trusted_tasks") merged via object.union.

Comment thread THREAT_MODEL.md
| `pipeline_intention` | Operational mode of certain rules changed |

### 3.3 Trusted task data (`data.trusted_tasks`, `data.trusted_task_rules`)
### 3.3 Trusted task data

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] Internal consistency

Section heading changed to remove data.trusted_tasks reference, but data.trusted_tasks is still a valid input path in the code. Fixing the high-severity body text errors would naturally lead to restoring this in the heading.

@fullsend-ai-review fullsend-ai-review Bot added the documentation Improvements or additions to documentation label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update stale THREAT_MODEL.md references to removed data.trusted_task_rules architecture

0 participants