Threat Model

licit operates as a local auditing tool. Its attack surface is limited, but there are risks to consider:

Identified Threats

ThreatSeverityMitigation
Provenance store manipulationHighHMAC-SHA256 signing, Merkle tree integrity
Sensitive data in FRIAMedium.gitignore for fria-data.json, do not push to public repos
Injection via malicious YAMLLowExclusive use of yaml.safe_load() (not yaml.load())
Compromised dependenciesMediumPeriodic auditing, minimum version pinning
Code execution via configsLowNo code is executed from configs; only data is parsed
Contributor info exposureLowProvenance is not pushed by default; .gitignore recommendation

What licit Does NOT Do


Cryptographic Signing (provenance)

HMAC-SHA256

When provenance signing is enabled (provenance.sign: true), each record is signed with HMAC-SHA256:

signature = HMAC-SHA256(key, canonical_json(record))

Configuration:

provenance:
  sign: true
  sign_key_path: ~/.licit/signing-key

Key generation:

# Generate a 256-bit key
python3.12 -c "import secrets; print(secrets.token_hex(32))" > ~/.licit/signing-key
chmod 600 ~/.licit/signing-key

Attestation (Merkle tree)

In future phases, licit will implement a Merkle tree over the provenance store to detect manipulation or deletion of records:

         root_hash
        /         \
    hash_01      hash_23
    /    \       /    \
 hash_0 hash_1 hash_2 hash_3
   |      |      |      |
 rec_0  rec_1  rec_2  rec_3

Any modification of a record invalidates the hash chain from that record to the root.


Data Protection

Sensitive Data Generated by licit

FileSensitivityRecommendation
.licit.yamlLowCommit to repo
.licit/provenance.jsonlMediumDo not commit (contains contributor info)
.licit/fria-data.jsonHighDo not commit (rights impact data)
.licit/fria-report.mdMediumSelective commit
.licit/annex-iv.mdLowCommit to repo
.licit/changelog.mdLowCommit to repo
.licit/reports/*LowCommit to repo
Signing keyCriticalNever commit, permissions 600
# licit — sensitive data
.licit/provenance.jsonl
.licit/fria-data.json

# licit — signing key (if stored in the project)
.licit/signing-key
*.key

# licit — generated reports (optional, can be committed)
# .licit/reports/

Dependencies

Dependency Audit

licit uses 6 runtime dependencies, all widely adopted:

DependencyMin. versionPurposeMaintainer
click8.1+CLI frameworkPallets
pydantic2.0+Config validationSamuel Colvin
structlog24.1+Structured loggingHynek Schlawack
pyyaml6.0+YAML parsingYAML org
jinja23.1+Report templatesPallets
cryptography42.0+HMAC-SHA256PyCA

Recommendations

  1. Pin versions in production: Use a requirements.txt or pip-compile to lock exact versions.

  2. Audit regularly:

    pip audit                    # Checks for known vulnerabilities
    pip install pip-audit && pip-audit  # Alternative
  3. Verify hashes:

    pip install --require-hashes -r requirements.txt

Secure File Parsing

YAML

licit always uses yaml.safe_load() to parse YAML. Never yaml.load() (which allows arbitrary Python code execution).

# Correct (what licit does)
data = yaml.safe_load(f.read())

# NEVER (vulnerable to code execution)
# data = yaml.load(f.read(), Loader=yaml.FullLoader)

JSON

For SARIF and other JSON files, standard json.load() is used, which is secure by design.

Agent Configuration Files

Files like CLAUDE.md, .cursorrules, AGENTS.md are read as plain text. licit does not interpret or execute their content — it only analyzes them to detect changes and extract metadata.


External Process Execution

licit executes git commands via subprocess.run() with the following protections:

# How licit executes git commands
result = subprocess.run(
    ["git", "rev-list", "--count", "HEAD"],
    capture_output=True,
    text=True,
)

Vulnerability Reporting

If you find a security vulnerability in licit:

  1. Do not open a public issue.
  2. Send an email to the maintainers with:
    • Description of the vulnerability
    • Steps to reproduce
    • Potential impact
  3. You will receive a confirmation within 48 hours.
  4. A fix and advisory will be published once resolved.

See SECURITY.md at the project root for contact information.