# eval-trace-pii-exposure-v1

> eval-trace-pii-exposure-v1: 5 Keryn rules for typescript, javascript, python (1 warning, 4 info).

Source: https://keryn.dev/rules/eval-trace-pii-exposure-v1/

5 rules · Keryn Software Licence · rules 0.8.0 · [all packs](https://keryn.dev/rules/)

**How to read a rule**

- **Severity**: How bad the finding is if it is real: `error` fails a default gate, `warning` and `info` do not.

- **Confidence**: **P0** exploitable as written; **P1** dangerous in context; **P2** a heuristic or a posture check: confirm by reading the code.

- **False-positive risk**: **low**: an exact API or flag, so hits are almost always real; **medium**: the pattern is legitimate in many programs, so check each hit; **high**: it finds a lead to confirm, so expect benign hits.

- **Edge**: The relationship the finding sits on. **reaches**: content or traffic gets to a thing; **calls**: one thing invokes another; **reads**: one thing reads from another; **writes**: one thing writes to another; **sends**: data leaves for another party; **grants**: authority is given or left unchecked; **depends_on**: something relies on a component it does not verify; **trusts**: one party believes another without evidence. The boundary it crosses, when there is one: **user->prompt** (untrusted input reaching a prompt); **model->code** (model output reaching code, a shell, a query or a page); **secret->outside** (a secret leaving the trusted side); **supply-chain** (code, models or prompts pulled in from outside).

- **Taxonomy chips**: References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.

## seceng.eval.langfuse-raw-input-output-logging

`info` typescript, javascript, python eval-trace-pii-exposure

Langfuse trace or generation call captures raw input/output without a redaction step. User messages, prompts, and completions may contain PII that should not be stored unredacted.

Confidence **P1**: dangerous in context.

Edge inspected: [sends](https://keryn.dev/docs/edges/edge-kinds/#sends) data leaves for another party; it crosses the [`secret->outside`](https://keryn.dev/docs/edges/trust-boundaries/#secret-to-outside) boundary (a secret leaving the trusted side).

[CWE-312](https://keryn.dev/taxonomies/cwe/#cwe-312-cleartext-storage-of-sensitive-information) [CWE-532](https://keryn.dev/taxonomies/cwe/#cwe-532-insertion-of-sensitive-information-into-log-file) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM07](https://keryn.dev/taxonomies/owasp-llm/#llm07-system-prompt-leakage) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution)

## seceng.eval.phoenix-trace-raw-data

`warning` python, typescript, javascript eval-trace-pii-exposure

Arize Phoenix or OpenInference span/trace data is written with raw input/output. Ensure PII redaction is applied before trace export.

Confidence **P1**: dangerous in context. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [sends](https://keryn.dev/docs/edges/edge-kinds/#sends) data leaves for another party; it crosses the [`secret->outside`](https://keryn.dev/docs/edges/trust-boundaries/#secret-to-outside) boundary (a secret leaving the trusted side).

[CWE-312](https://keryn.dev/taxonomies/cwe/#cwe-312-cleartext-storage-of-sensitive-information) [CWE-532](https://keryn.dev/taxonomies/cwe/#cwe-532-insertion-of-sensitive-information-into-log-file) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [ASI06](https://keryn.dev/taxonomies/owasp-agentic/#asi06-memory-and-context-poisoning)

## seceng.eval.mlflow-log-raw-prompt

`info` python mlflow

MLflow experiment logging captures raw prompt or prediction data. Apply PII masking before mlflow.log\_text or mlflow.log\_param calls on sensitive fields.

Confidence **P0**: exploitable as written. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [sends](https://keryn.dev/docs/edges/edge-kinds/#sends) data leaves for another party; it crosses the [`secret->outside`](https://keryn.dev/docs/edges/trust-boundaries/#secret-to-outside) boundary (a secret leaving the trusted side).

[CWE-312](https://keryn.dev/taxonomies/cwe/#cwe-312-cleartext-storage-of-sensitive-information) [CWE-532](https://keryn.dev/taxonomies/cwe/#cwe-532-insertion-of-sensitive-information-into-log-file) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [ASI06](https://keryn.dev/taxonomies/owasp-agentic/#asi06-memory-and-context-poisoning)

**Try it: a snippet that triggers this rule**

Written for this page, not taken from any project. Save it as `eval/run.py` and scan it with `keryn scan eval --verbose`; the finding below appears.

```python
import mlflow

def log_run(prompt: str, completion: str, score: float):
    with mlflow.start_run():
        mlflow.log_text(prompt, "prompt.txt")
        mlflow.log_text(completion, "completion.txt")
        mlflow.log_metric("score", score)
```

Checked with Keryn's browser engine when this page was built: it reports `seceng.eval.mlflow-log-raw-prompt` at line 6 (info, proof 1). The rule's own logic is not published, so it cannot run in this tab; the pack list in the [playground](https://keryn.dev/playground/) shows what does.

## seceng.eval.weave-trace-without-redaction

`info` python eval-trace-pii-exposure

Weights &amp; Biases Weave trace call logs model inputs/outputs. Confirm PII redaction is applied before trace publication.

Confidence **P0**: exploitable as written.

Edge inspected: [sends](https://keryn.dev/docs/edges/edge-kinds/#sends) data leaves for another party; it crosses the [`secret->outside`](https://keryn.dev/docs/edges/trust-boundaries/#secret-to-outside) boundary (a secret leaving the trusted side).

[CWE-312](https://keryn.dev/taxonomies/cwe/#cwe-312-cleartext-storage-of-sensitive-information) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents)

## seceng.eval.public-dashboard-no-auth

`info` python, typescript, javascript mlflow

Eval or observability dashboard endpoint appears to be served without authentication. Langfuse, Phoenix, and MLflow UIs may expose raw prompts and user data publicly.

Confidence **P0**: exploitable as written.

Edge inspected: [sends](https://keryn.dev/docs/edges/edge-kinds/#sends) data leaves for another party; it crosses the [`secret->outside`](https://keryn.dev/docs/edges/trust-boundaries/#secret-to-outside) boundary (a secret leaving the trusted side).

[CWE-306](https://keryn.dev/taxonomies/cwe/#cwe-306-missing-authentication-for-critical-function) [CWE-312](https://keryn.dev/taxonomies/cwe/#cwe-312-cleartext-storage-of-sensitive-information) [LLM07](https://keryn.dev/taxonomies/owasp-llm/#llm07-system-prompt-leakage) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution) [ASI01](https://keryn.dev/taxonomies/owasp-agentic/#asi01-agent-goal-hijack) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)
