Reference Syntax Specification

Overview

CFSE documents establish relationships between artifacts through references. This specification defines three distinct reference styles, each serving specific documentation needs:

  1. Inline Backtick Reference - Casual mentions in prose
  2. Bracketed Link Reference - Formal, navigable references
  3. Field Reference - Structured metadata fields

Reference Styles

1. Inline Backtick Reference

Used for casual mentions of artifacts within narrative text.

Syntax

code
`<ARTIFACT-ID>`

Characteristics

PropertyValue
PurposeCasual mention in prose
NavigationNot automatically linked
ValidationID syntax validation only
ContextRunning text, explanations

Usage Guidelines

  • Use when mentioning an artifact without implying dependency
  • Appropriate for examples and explanatory text
  • Does not create formal traceability
  • May appear multiple times for the same artifact

Examples

Prose usage:

The C-AWS-IAM-ROLE concept represents an AWS IAM role that can be assumed by principals. When combined with C-AWS-TRUST-POLICY, it enables cross-account access patterns.

In lists:

Key concepts involved:

  • C-AWS-IAM-ROLE - The assumable role
  • C-AWS-TRUST-POLICY - Defines who can assume
  • C-AWS-SESSION-TOKEN - Temporary credentials

In code comments:

yaml
# This interaction implements the assume role pattern
# See `I-AWS-ASSUME-ROLE-001` for details

Used for formal references that establish navigable relationships.

Syntax

code
[[<ARTIFACT-ID>]]

Characteristics

PropertyValue
PurposeFormal, navigable reference
NavigationAutomatically resolved to link
ValidationID existence verification
ContextTraceability sections, formal links

Usage Guidelines

  • Use when establishing formal relationships
  • Creates traceability in dependency graphs
  • Should resolve to actual artifact documents
  • Tooling may verify existence and generate links

Examples

Formal dependency:

markdown
## Dependencies
 
This scenario depends on:
- [[C-AWS-IAM-ROLE]] - Core role concept
- [[C-AWS-TRUST-POLICY]] - Trust relationship definition
- [[I-AWS-ASSUME-ROLE-001]] - Assume role interaction

Cross-references in YAML frontmatter:

yaml
related:
  concepts:
    - "[[C-AWS-IAM-ROLE]]"
    - "[[C-AWS-SESSION-TOKEN]]"
  interactions:
    - "[[I-AWS-ASSUME-ROLE-001]]"

Inline formal reference:

This exploration validates [[INV-AWS-ROLE-TRUST-BOUNDARY]] through systematic testing of [[F-AWS-CROSS-ACCOUNT-ACCESS]].

Resolution Rules

ContextResolution Behavior
MarkdownConvert to relative file link
YAMLValidate existence, store as string
HTML exportConvert to hyperlink
ValidationVerify artifact exists

3. Field Reference

Used in structured metadata fields within YAML frontmatter or configuration.

Syntax

yaml
<FIELD>: <ID>

Or for multiple references:

yaml
<FIELD>:
  - <ID-1>
  - <ID-2>

Characteristics

PropertyValue
PurposeStructured metadata binding
NavigationField-specific interpretation
ValidationType-checked against field schema
ContextYAML frontmatter, schemas

Usage Guidelines

  • Use in document frontmatter for machine-readable relationships
  • Field name determines expected ID type
  • Enables automated validation and tooling
  • Supports both single and list values

Examples

Single value fields:

yaml
---
id: E-AWS-PRIVILEGE-ESCALATION-001-01
scenario: S-AWS-PRIVILEGE-ESCALATION-001
flow: F-AWS-CROSS-ACCOUNT-ACCESS
---

List value fields:

yaml
---
id: F-AWS-CROSS-ACCOUNT-ACCESS
concepts:
  - C-AWS-IAM-ROLE
  - C-AWS-TRUST-POLICY
  - C-AWS-SESSION-TOKEN
interactions:
  - I-AWS-ASSUME-ROLE-001
  - I-AWS-GET-CREDENTIALS-002
invariants:
  - INV-AWS-ROLE-TRUST-BOUNDARY
  - INV-AWS-SESSION-DURATION
---

Typed reference fields:

yaml
---
findings:
  - id: FD-AWS-AUTHZ-001
    severity: HIGH
    related_invariant: INV-AWS-ROLE-TRUST-BOUNDARY
---

Reference Contexts by Artifact Type

Concept References

ContextReference StyleExample
Interaction subjectFieldsubject: C-AWS-IAM-ROLE
Interaction targetFieldtarget: C-AWS-TRUST-POLICY
Flow participantFieldconcepts: [C-AWS-IAM-ROLE]
Prose mentionBacktick`C-AWS-IAM-ROLE`
Formal dependencyBracketed[[C-AWS-IAM-ROLE]]

Interaction References

ContextReference StyleExample
Flow stepFieldsteps: [I-AWS-ASSUME-ROLE-001]
Invariant scopeFieldapplies_to: [I-AWS-ASSUME-ROLE-001]
Prose mentionBacktick`I-AWS-ASSUME-ROLE-001`
TraceabilityBracketed[[I-AWS-ASSUME-ROLE-001]]

Entry Point References

ContextReference StyleExample
Concept surface inventoryFieldentry_points: [EP-AWS-IAM-ROLE-API-ASSUME]
Interaction trigger surfaceFieldentry_points: [EP-AWS-IAM-ROLE-API-ASSUME]
Scenario anchorFieldattack_vector.anchor.ref: EP-AWS-IAM-ROLE-API-ASSUME
Projection surfacesFieldsurfaces: [{ ref: EP-AWS-IAM-ROLE-API-ASSUME }]
Prose mentionBacktick`EP-AWS-IAM-ROLE-API-ASSUME`
Formal dependencyBracketed[[EP-AWS-IAM-ROLE-API-ASSUME]]

Flow References

ContextReference StyleExample
Scenario flowFieldflow: F-AWS-CROSS-ACCOUNT-ACCESS
Exploration targetFieldflow: F-AWS-CROSS-ACCOUNT-ACCESS
Related flowsBracketed[[F-AWS-CROSS-ACCOUNT-ACCESS]]
Prose mentionBacktick`F-AWS-CROSS-ACCOUNT-ACCESS`

Scenario References

ContextReference StyleExample
Exploration parentFieldscenario: S-AWS-PRIVILEGE-ESCALATION-001
Finding sourceFieldscenario: S-AWS-PRIVILEGE-ESCALATION-001
Cross-referenceBracketed[[S-AWS-PRIVILEGE-ESCALATION-001]]
Prose mentionBacktick`S-AWS-PRIVILEGE-ESCALATION-001`

Exploration References

ContextReference StyleExample
Finding sourceFieldexploration: E-AWS-PRIVILEGE-ESCALATION-001-01
Patch targetFieldexploration: E-AWS-PRIVILEGE-ESCALATION-001-01
Cross-referenceBracketed[[E-AWS-PRIVILEGE-ESCALATION-001-01]]
Prose mentionBacktick`E-AWS-PRIVILEGE-ESCALATION-001-01`

Trace References

ContextReference StyleExample
Exploration trace evidenceFieldtrace_refs.attack: T-AWS-PRIVILEGE-ESCALATION-001-01-02
Finding trace evidenceFieldtraceability.trace_refs: [T-AWS-PRIVILEGE-ESCALATION-001-01-01]
Cross-referenceBracketed[[T-AWS-PRIVILEGE-ESCALATION-001-01-02]]
Prose mentionBacktick`T-AWS-PRIVILEGE-ESCALATION-001-01-02`

Projection References

ContextReference StyleExample
Prose mentionBacktick`PRJ-AWS-ANON-S3-LIST`
Formal dependencyBracketed[[PRJ-AWS-ANON-S3-LIST]]

Finding References

ContextReference StyleExample
Patch addressesFieldaddresses: [FD-AWS-AUTHZ-001]
Related findingsBracketed[[FD-AWS-AUTHZ-001]]
Prose mentionBacktick`FD-AWS-AUTHZ-001`

Invariant References

ContextReference StyleExample
Scenario invariantsFieldinvariants: [INV-AWS-ROLE-TRUST-BOUNDARY]
Finding violationFieldviolated_invariant: INV-AWS-ROLE-TRUST-BOUNDARY
Formal referenceBracketed[[INV-AWS-ROLE-TRUST-BOUNDARY]]
Prose mentionBacktick`INV-AWS-ROLE-TRUST-BOUNDARY`

Predicate References

ContextReference StyleExample
Invariant compositionFieldpredicates: [P-AWS-HAS-MFA]
Logic expressionInlineP-AWS-HAS-MFA(principal)
Formal referenceBracketed[[P-AWS-HAS-MFA]]

Generator References

ContextReference StyleExample
Scenario generatorFieldgenerator: GEN-BOUNDARY-001
Cross-referenceBracketed[[GEN-BOUNDARY-001]]
Prose mentionBacktick`GEN-BOUNDARY-001`

Patch References

ContextReference StyleExample
Finding resolutionFieldresolved_by: PATCH-AWS-001
Cross-referenceBracketed[[PATCH-AWS-001]]
Prose mentionBacktick`PATCH-AWS-001`

Resolution Rules

Backtick Resolution

code
Input:  `C-AWS-IAM-ROLE`
Output: <code>C-AWS-IAM-ROLE</code>
  • No link resolution
  • Syntax validation only
  • Rendered as inline code

Bracketed Resolution

code
Input:  [[C-AWS-IAM-ROLE]]
Output: `C-AWS-IAM-ROLE` → `<corpus_root>/concepts/C-AWS-IAM-ROLE.md`

Resolution algorithm:

  1. Parse artifact ID from brackets
  2. Detect artifact type from prefix
  3. Look up artifact in appropriate directory
  4. Generate relative or absolute path
  5. Validate artifact exists (optional, configurable)
  6. Produce markdown/HTML link

Field Resolution

yaml
Input:  scenario: S-AWS-PRIVILEGE-ESCALATION-001
Output: { "scenario": "S-AWS-PRIVILEGE-ESCALATION-001", "_resolved": true }

Resolution algorithm:

  1. Parse field name and value
  2. Determine expected ID type from schema
  3. Validate ID matches expected pattern
  4. Optionally verify artifact exists
  5. Store for tooling consumption

Mixed Reference Example

Complete document showing all reference styles:

markdown
---
id: E-AWS-PRIVILEGE-ESCALATION-001-01
title: IAM Role Chain Privilege Escalation
scenario: S-AWS-PRIVILEGE-ESCALATION-001
flow: F-AWS-CROSS-ACCOUNT-ACCESS
concepts:
  - C-AWS-IAM-ROLE
  - C-AWS-TRUST-POLICY
invariants:
  - INV-AWS-ROLE-TRUST-BOUNDARY
---
 
# IAM Role Chain Privilege Escalation
 
## Overview
 
This exploration tests the `C-AWS-IAM-ROLE` concept for privilege
escalation vulnerabilities through role chaining.
 
## Dependencies
 
Formal dependencies for this exploration:
- [[C-AWS-IAM-ROLE]] - Primary target concept
- [[C-AWS-TRUST-POLICY]] - Trust boundary definition
- [[I-AWS-ASSUME-ROLE-001]] - Core interaction tested
 
## Invariants Tested
 
This exploration validates [[INV-AWS-ROLE-TRUST-BOUNDARY]]:
 
> FORALL role: C-AWS-IAM-ROLE.
>   `P-AWS-TRUST-VALIDATED`(role) IMPLIES
>   `P-AWS-WITHIN-BOUNDARY`(role)
 
## Methodology
 
Testing follows the [[F-AWS-CROSS-ACCOUNT-ACCESS]] flow pattern,
executing `I-AWS-ASSUME-ROLE-001` with various trust policy
configurations.
 
## Findings
 
| ID | Severity | Invariant Violated |
|----|----------|-------------------|
| [[FD-AWS-AUTHZ-001]] | HIGH | [[INV-AWS-ROLE-TRUST-BOUNDARY]] |

  • [[01-id-syntax]] - Artifact ID patterns and validation
  • [[03-formal-logic]] - Logical operators in expressions
  • [[04-field-types]] - Field type definitions for schemas