T09 · Insecure Skill Coding Practices
- Location
scripts/run_pipeline.py:60- Finding
Raw PII Is Persisted in the Audit Profile Before Masking or Removal
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a local data-cleaning utility, but its privacy and data-integrity safeguards are weaker than its documentation says.
Install only after reviewing the privacy and deduplication limitations. Treat all generated output and audit files as potentially sensitive, avoid relying on mask/drop for complete PII removal, and keep original data backups before using fuzzy deduplication.
scripts/run_pipeline.py:60Raw PII Is Persisted in the Audit Profile Before Masking or Removal
scripts/run_pipeline.py:12Documented PII Masking and Removal Policies Leave Multiple Sensitive Data Classes Unchanged
scripts/dedup.py:12Fuzzy Deduplication Automatically Deletes Records Without the Promised Human Review Gate
The declared description presents a broad, industrial-strength data cleaning system covering file/source handling, schema analysis, normalization, missing-data processing, cross-source reconciliation, deduplication, and reporting. The supplied code chunk does not implement that overall behavior. It is a narrow helper that accepts already-loaded rows and key names, groups similar records by average string similarity, and returns deduplicated rows plus basic counts. There is no evidence of source parsing, cleaning pipeline orchestration, schema handling, reporting, or other advertised capabilities. This is therefore a material description-to-behavior mismatch, primarily because the actual code covers only one subfeature of the much broader declared purpose.
The declared description promises a broad end-to-end data cleaning system across heterogeneous sources, including file ingestion, schema analysis, missing-value processing, deduplication, source reconciliation, and report generation. The supplied code chunk is much narrower: it implements low-level type normalization utilities and PII masking helpers. While type normalization is one supporting aspect of data cleaning, the actual code does not substantiate the majority of the declared functionality. Additionally, PII masking appears as an undeclared capability. Therefore the description does not accurately represent what this code chunk actually does.
The declared description promises a broad, production-grade data cleaning and unification capability across many file types and sources. The supplied code only profiles one tabular dataset from CSV or JSON and emits summary statistics. While profiling and limited CSV encoding fallback are tangentially related to the declared tool, the primary purpose is materially different: analysis/reporting rather than cleaning/merging/reconciling. There is no evidence of deduplication, missing-value processing, schema alignment, type normalization, multi-source support, or cleaned dataset generation. Therefore the description substantially overstates the implemented behavior.
The description overstates the implementation. The code does implement parts of a data-cleaning workflow: ingesting one or more files, per-source profiling, basic type normalization, optional deduplication, and outputting cleaned data plus reports. However, several headline capabilities in the declared purpose are absent or not evidenced in this chunk: no visible encoding/delimiter detection, no schema reconciliation across heterogeneous sources, no explicit missing-value treatment, and no clearly fuzzy deduplication. The supported-format claim is also not substantiated here because the code delegates reading to _read_rows without showing broad-format handlers. Additionally, the code includes a materially undeclared capability: PII masking or dropping based on policy. Overall, the actual behavior is a narrower demo cleaner with basic reporting and PII handling, not the full production-grade heterogeneous cleaning system described.
Without declared permissions the skill's intent is opaque and cannot be validated.
Overly broad trigger keywords can cause the skill to activate on generic requests, increasing the chance that user data is routed into a powerful file-processing workflow unexpectedly. In a data-cleaning skill that reads multiple local files and produces transformed outputs, over-triggering can lead to unintended handling of sensitive datasets, accidental modification workflows, or bypass of a more appropriate specialized skill.
The manifest describes production-grade cleaning across CSV/Excel/JSON/Parquet/SQL dumps/log files, including schema reconciliation, type normalization, missing-value handling, fuzzy deduplication, and unified clean dataset output. In contrast, this script only reads JSON or CSV, computes basic per-column counts/uniqueness/null rates, and writes a profiling summary; it performs no cleaning, merging, deduplication, schema alignment, or support for the other claimed formats.
The generated report includes raw sample values from the dataset (sample: non_null[:3]) and may print them to stdout or write them to a file without any warning or masking. In a data-cleaning context, inputs often contain PII, credentials, financial records, or other sensitive business data, so this behavior can cause unintended disclosure through logs, terminals, shared files, or pipeline artifacts.
The pipeline writes the cleaned dataset to disk unconditionally, and the CLI allows --pii-policy=keep, which can preserve names, phone numbers, and ID numbers in the output file without any explicit warning, confirmation, or safer default behavior at write time. In a data-cleaning skill that processes heterogeneous user datasets, this increases the risk of accidental retention and disclosure of sensitive personal data through local artifacts, backups, or downstream sharing.
The docstring states the skill normalizes 'common Chinese/English data types,' which is a natural-language locale constraint. Because the file does not offer user opt-in for this language scope or explain why the limitation is required, it may violate the policy against forcing a specific language or locale.
No suspicious patterns detected.