T09 · Insecure Skill Coding Practices
- Location
scripts/x_data_validator.py:203- Finding
Invalid X Records Remain Accepted After Integrity and Sanity-Check Failures
- Content
View full analysis
impressions: checks.append({ "step": "sanity_check_likes", "status": "ERROR", "tweet_id": tweet_id, "message": f"IMPOSSIBLE: Likes ({likes}) > Impressions ({impressions})", "action": "FLAG_ANOMALY — data error detected but not modified", "severity": "ERROR" }) self._log_error("Data anomaly: likes > impressions", { "tweet_id": tweet_id, "likes": likes, "impressions": impressions }) if retweets is not None and impressions is not None and retweets > impressions: checks.append({ "step": "sanity_check_retweets", "status": "ERROR", "tweet_id": tweet_id, "message": f"IMPOSSIBLE: Retweets ({retweets}) > Impressions ({impressions})", "severity": "ERROR" }) self._log_error("Data anomaly: retweets > impressions", { "tweet_id": tweet_id, "retweets": retweets, "impressions": impressions }) for metric_name in required_metrics: value = metrics.get(metric_name) if value is not None and value < 0: checks.append({ "step": f"sanity_check_{metric_name}", "status": "ERROR", ...[truncated 3210 chars]- Remediation
View remediation
