T09 · Insecure Skill Coding Practices
- Location
scripts/test_detectors.py:325- Finding
Default online mode transmits complete user drafts to multiple third-party services without per-run consent
- Content
View full analysis
DetectorResult: key = os.getenv("GPTZERO_API_KEY") if not key: return DetectorResult("GPTZero", None, "no API key (set GPTZERO_API_KEY)") try: r = requests.post( "https://api.gptzero.me/v2/predict/text", headers={"x-api-key": key, "Content-Type": "application/json"}, json={"document": text}, timeout=30, ) ``` ```python def detect_originality(text: str) -> DetectorResult: key = os.getenv("ORIGINALITY_API_KEY") if not key: return DetectorResult("Originality.ai", None, "no API key (set ORIGINALITY_API_KEY)") try: r = requests.post( "https://api.originality.ai/api/v1/scan/ai", headers={"X-OAI-API-KEY": key, "Content-Type": "application/json"}, json={"content": text, "title": "detector-test"}, timeout=30, ) ``` ```python def detect_zerogpt(text: str) -> DetectorResult: key = os.getenv("ZEROGPT_API_KEY") if not key: return DetectorResult("ZeroGPT", None, "no API key (set ZEROGPT_API_KEY)") try: r = requests.post( "https://api.zerogpt.com/api/detect/detectText", headers={"ApiKey": key, "Content-Type": "application/json"}, json={"input_text": text}, timeout=30, ) ``` ```python def detect_sapling(text: str) -> DetectorResult: key = os.getenv("SAPLING_API_KEY") if not key: return DetectorResult("Sapling", None, "no API key (set SAPLING_API_KEY)") try: r = requests.post( "https://api.sapling.ai/api/v1/aidetect", json={"key": key, "text": text}, timeout=30, ...[truncated 4228 chars]- Remediation
View remediation
