{"schema_version":"2","scorer_version":"0.1.0","scoring_version":"prov-4+qual-2+sec-2","generated_at":"2026-11-13T23:52:46.496434Z","repo":{"ref":{"host":"github.com","owner":"raygan","name":"mam-audiofinder"},"default_branch":"master","clone_url":"https://github.com/raygan/mam-audiofinder.git","html_url":"https://github.com/raygan/mam-audiofinder","description":"A simple webUI to download audiobooks from MyAnonymouse using qBittorrent, and import them to an Audiobookshelf library","stars":87,"forks":5,"is_fork":false,"is_archived":false,"is_private":false,"size_kb":422,"primary_language":"Python","license_spdx":null,"created_at":"2025-09-16T05:43:43Z","pushed_at":"2025-12-10T05:57:50Z","security_policy_url":null,"distribution":{"owner_created_at":"2012-12-06T16:52:16Z","owner_type":"User","release_assets":[]}},"commit_sha":"08dc54ba85a6e72d002bf94d950d830ae469d69a","profile":{"lines_by_language":{"Python":682,"JavaScript":396},"files_by_category":{"binary":12,"docs":4,"other":4,"source":3,"config":2},"source_lines":1078,"test_lines":0},"pillars":{"ai_provenance":{"score":0.0,"confidence":0.49,"coverage":1.0,"label":"possible","breakdown":{"attributed_share":0.0,"suspected_share":0.0,"estimated_share":0.0,"ai_artifacts":1.0,"flagged_work_units":0.0,"flagged_releases":null},"summary":"Weak signals consistent with AI-assisted development."},"quality":{"score":35.9,"confidence":0.9,"coverage":1.0,"label":"poor","breakdown":{"complexity":40.1,"duplication":72.1,"lint":49.9,"testing":0.0,"docs":40.0,"type_safety":40.0,"process":null},"summary":"Code quality is poor: test-to-source ratio 0.00, no CI test run detected; 30% of function code in complex or long functions; 5% duplicated lines. Weakest area: testing."},"security":{"score":60.8,"confidence":0.85,"coverage":1.0,"label":"weak","breakdown":{"secrets":100.0,"sast":3.1,"dependencies":100.0,"ci_actions":null,"posture":0.0,"scorecard":null},"summary":"Security posture is weak: 11 high-severity SAST findings. Weakest area: posture."}},"analyzer_results":[{"analyzer":"sec-scorecard","pillar":"security","status":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"error":"no published OpenSSF Scorecard result for this repo"},{"analyzer":"sec-registry","pillar":"security","status":"ok","tool_version":null,"metrics":{"declared":5.0,"checked":5.0,"missing":0.0,"recent":0.0,"lookup_errors":0.0},"findings":[],"evidence":[],"data":{"phantom":false},"error":null},{"analyzer":"ai-attribution","pillar":"ai_provenance","status":"ok","tool_version":"signatures-v1","metrics":{"commits":35.0,"attributed_commits":0.0,"attributed_commit_share":0.0,"effective_loc":1369.0,"attributed_loc":0.0,"attributed_loc_share":0.0,"tools_detected":0.0},"findings":[],"evidence":[],"data":{"attributed_loc_by_commit":{},"tools":{},"monthly":{"2025-09":{"loc":1097,"attributed_loc":0},"2025-12":{"loc":272,"attributed_loc":0}}},"error":null},{"analyzer":"ai-artifacts","pillar":"ai_provenance","status":"ok","tool_version":"signatures-v1","metrics":{"artifacts":1.0,"workflow_agents":0.0,"tools_configured":1.0,"earliest_adoption":1765307216.0},"findings":[],"evidence":[{"kind":"ai-artifact","description":"AGENTS.md (generic-agent configuration)","ref":"AGENTS.md","url":"https://github.com/raygan/mam-audiofinder/blob/08dc54ba85a6e72d002bf94d950d830ae469d69a/AGENTS.md","weight":0.5}],"data":{"artifacts":[{"tool":"generic-agent","path":"AGENTS.md","added_at":1765307216}],"workflows":[],"tools":["generic-agent"]},"error":null},{"analyzer":"ai-velocity","pillar":"ai_provenance","status":"ok","tool_version":"prov-4","metrics":{"work_units":8.0,"flagged_units":0.0,"pre_ai_era_bursts":0.0,"pre_ai_era_measured_loc":0.0,"pre_ai_era_burst_loc":0.0,"measured_loc":1369.0,"flagged_loc":0.0,"flagged_loc_share":0.0,"max_loc_per_hour":162.28697086311163,"median_loc_per_hour":92.96073072497123,"pr_timed_units":0.0,"excluded_import_loc":0.0},"findings":[],"evidence":[],"data":{"flagged_loc_by_commit":{},"excluded_import_commits":[]},"error":null},{"analyzer":"ai-release-velocity","pillar":"ai_provenance","status":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"error":null},{"analyzer":"ai-stylometry","pillar":"ai_provenance","status":"ok","tool_version":null,"metrics":{"lines_scanned":1078.0,"index":0.928,"count:narrated_steps":0.0,"per_kloc:narrated_steps":0.0,"files:narrated_steps":0.0,"count:placeholder":0.0,"per_kloc:placeholder":0.0,"files:placeholder":0.0,"count:emoji_in_code":2.0,"per_kloc:emoji_in_code":1.855,"files:emoji_in_code":1.0,"count:assistant_voice":0.0,"per_kloc:assistant_voice":0.0,"files:assistant_voice":0.0},"findings":[],"evidence":[],"data":{},"error":null},{"analyzer":"sec-secrets","pillar":"security","status":"ok","tool_version":"gitleaks 8.30.1","metrics":{"secrets_current":0.0,"secrets_history":0.0,"secrets_nonprod":0.0,"secrets_low_confidence":0.0},"findings":[],"evidence":[],"data":{},"error":null},{"analyzer":"sec-sast","pillar":"security","status":"ok","tool_version":"opengrep 1.33.1; rules f1d2b562b414","metrics":{"findings":19.0,"findings_high":11.0,"findings_medium":5.0,"findings_low":3.0,"weighted_findings":10.738,"scanned_lines":1078.0,"parse_errors":0.0},"findings":[{"rule_id":"opengrep/dockerfile.security.missing-user","severity":"high","message":"By not specifying a USER, a program in the container may run as 'root'. This is a security hazard. If an attacker can control a process running as root, they may have control over the container. Ensure that the last USER in a Dockerfile is a USER other than 'root'. [confidence medium]","path":"Dockerfile","line":11,"fingerprint":"dockerfile.security.missing-user:Dockerfile:11"},{"rule_id":"opengrep/javascript.browser.security.insecure-document-method","severity":"high","message":"User controlled data in methods like `innerHTML`, `outerHTML` or `document.write` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"app/static/app.js","line":112,"fingerprint":"javascript.browser.security.insecure-document-method:app/static/app.js:112"},{"rule_id":"opengrep/javascript.browser.security.insecure-innerhtml","severity":"high","message":"User controlled data in a `tr.innerHTML` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"app/static/app.js","line":112,"fingerprint":"javascript.browser.security.insecure-innerhtml:app/static/app.js:112"},{"rule_id":"opengrep/javascript.browser.security.insecure-document-method","severity":"high","message":"User controlled data in methods like `innerHTML`, `outerHTML` or `document.write` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"app/static/app.js","line":174,"fingerprint":"javascript.browser.security.insecure-document-method:app/static/app.js:174"},{"rule_id":"opengrep/javascript.browser.security.insecure-innerhtml","severity":"high","message":"User controlled data in a `tr.innerHTML` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"app/static/app.js","line":174,"fingerprint":"javascript.browser.security.insecure-innerhtml:app/static/app.js:174"},{"rule_id":"opengrep/javascript.browser.security.insecure-document-method","severity":"high","message":"User controlled data in methods like `innerHTML`, `outerHTML` or `document.write` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"app/static/app.js","line":201,"fingerprint":"javascript.browser.security.insecure-document-method:app/static/app.js:201"},{"rule_id":"opengrep/javascript.browser.security.insecure-innerhtml","severity":"high","message":"User controlled data in a `emptyTr.innerHTML` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"app/static/app.js","line":201,"fingerprint":"javascript.browser.security.insecure-innerhtml:app/static/app.js:201"},{"rule_id":"opengrep/javascript.browser.security.insecure-document-method","severity":"high","message":"User controlled data in methods like `innerHTML`, `outerHTML` or `document.write` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"app/static/app.js","line":210,"fingerprint":"javascript.browser.security.insecure-document-method:app/static/app.js:210"},{"rule_id":"opengrep/javascript.browser.security.insecure-innerhtml","severity":"high","message":"User controlled data in a `tr.innerHTML` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"app/static/app.js","line":210,"fingerprint":"javascript.browser.security.insecure-innerhtml:app/static/app.js:210"},{"rule_id":"opengrep/javascript.browser.security.insecure-document-method","severity":"high","message":"User controlled data in methods like `innerHTML`, `outerHTML` or `document.write` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"app/static/app.js","line":240,"fingerprint":"javascript.browser.security.insecure-document-method:app/static/app.js:240"},{"rule_id":"opengrep/javascript.browser.security.insecure-innerhtml","severity":"high","message":"User controlled data in a `expTd.innerHTML` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"app/static/app.js","line":240,"fingerprint":"javascript.browser.security.insecure-innerhtml:app/static/app.js:240"},{"rule_id":"opengrep/javascript.lang.security.html-in-template-string","severity":"medium","message":"This template literal looks like HTML and has interpolated variables. These variables are not HTML-encoded by default. If the variables contain HTML tags, these may be interpreted by the browser, resulting in cross-site scripting (XSS). [confidence low]","path":"app/static/app.js","line":121,"fingerprint":"javascript.lang.security.html-in-template-string:app/static/app.js:121"},{"rule_id":"opengrep/javascript.lang.security.html-in-template-string","severity":"medium","message":"This template literal looks like HTML and has interpolated variables. These variables are not HTML-encoded by default. If the variables contain HTML tags, these may be interpreted by the browser, resulting in cross-site scripting (XSS). [confidence low]","path":"app/static/app.js","line":174,"fingerprint":"javascript.lang.security.html-in-template-string:app/static/app.js:174"},{"rule_id":"opengrep/javascript.lang.security.html-in-template-string","severity":"medium","message":"This template literal looks like HTML and has interpolated variables. These variables are not HTML-encoded by default. If the variables contain HTML tags, these may be interpreted by the browser, resulting in cross-site scripting (XSS). [confidence low]","path":"app/static/app.js","line":201,"fingerprint":"javascript.lang.security.html-in-template-string:app/static/app.js:201"},{"rule_id":"opengrep/javascript.lang.security.html-in-template-string","severity":"medium","message":"This template literal looks like HTML and has interpolated variables. These variables are not HTML-encoded by default. If the variables contain HTML tags, these may be interpreted by the browser, resulting in cross-site scripting (XSS). [confidence low]","path":"app/static/app.js","line":210,"fingerprint":"javascript.lang.security.html-in-template-string:app/static/app.js:210"},{"rule_id":"opengrep/javascript.lang.security.html-in-template-string","severity":"medium","message":"This template literal looks like HTML and has interpolated variables. These variables are not HTML-encoded by default. If the variables contain HTML tags, these may be interpreted by the browser, resulting in cross-site scripting (XSS). [confidence low]","path":"app/static/app.js","line":214,"fingerprint":"javascript.lang.security.html-in-template-string:app/static/app.js:214"},{"rule_id":"opengrep/javascript.audit.detect-replaceall-sanitization","severity":"low","message":"Detected a call to `replaceAll()` in an attempt to HTML escape the string `(s || '').toString()`. Manually sanitizing input through a manually built list can be circumvented in many situations, and it's better to use a well known sanitization library such as `sanitize-html` or `DOMPurify`. [confidence low]","path":"app/static/app.js","line":140,"fingerprint":"javascript.audit.detect-replaceall-sanitization:app/static/app.js:140"},{"rule_id":"opengrep/javascript.audit.detect-replaceall-sanitization","severity":"low","message":"Detected a call to `replaceAll()` in an attempt to HTML escape the string `(s || '').toString()\n    .replaceAll('&', '&amp;')`. Manually sanitizing input through a manually built list can be circumvented in many situations, and it's better to use a well known sanitization library such as `sanitize-h [confidence low]","path":"app/static/app.js","line":140,"fingerprint":"javascript.audit.detect-replaceall-sanitization:app/static/app.js:140"},{"rule_id":"opengrep/javascript.audit.detect-replaceall-sanitization","severity":"low","message":"Detected a call to `replaceAll()` in an attempt to HTML escape the string `(s || '').toString()\n    .replaceAll('&', '&amp;')\n    .replaceAll('<', '&lt;')`. Manually sanitizing input through a manually built list can be circumvented in many situations, and it's better to use a well known sanitizatio [confidence low]","path":"app/static/app.js","line":140,"fingerprint":"javascript.audit.detect-replaceall-sanitization:app/static/app.js:140"}],"evidence":[],"data":{"rulesets":["python","javascript","dockerfile"]},"error":null},{"analyzer":"sec-deps","pillar":"security","status":"ok","tool_version":"osv-scanner version: 2.7.1","metrics":{"vulnerable_packages":0.0,"vulnerabilities":0.0,"vulns_critical":0.0,"vulns_high":0.0,"vulns_medium":0.0,"vulns_low":0.0,"vulns_unknown":0.0,"penalty":0.0},"findings":[],"evidence":[],"data":{"ecosystems":["PyPI"]},"error":null},{"analyzer":"sec-actions","pillar":"security","status":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"error":null},{"analyzer":"sec-posture","pillar":"security","status":"ok","tool_version":null,"metrics":{"check:security_policy":0.0,"check:dependency_updates":0.0,"check:signed_commits":0.0,"check:lockfiles":1.0,"signed_commit_share":0.0,"unpinned_manifests":0.0},"findings":[],"evidence":[],"data":{},"error":null},{"analyzer":"sec-distribution","pillar":"security","status":"ok","tool_version":null,"metrics":{"signals":0.0,"binary_assets":0.0,"suspicious":0.0},"findings":[],"evidence":[],"data":{"signals":[],"suspicious":false,"unusual_traction":false,"metadata":true},"error":null},{"analyzer":"qual-complexity","pillar":"quality","status":"ok","tool_version":"lizard 1.25.1","metrics":{"functions":43.0,"function_nloc":807.0,"mean_ccn":7.51,"p90_ccn":17.0,"complex_functions":5.0,"long_functions":0.0,"many_param_functions":0.0,"risky_nloc_share":0.3048},"findings":[],"evidence":[{"kind":"complex-function","description":"add_to_qb in app/main.py: complexity 39, 94 lines","ref":"app/main.py","url":"https://github.com/raygan/mam-audiofinder/blob/08dc54ba85a6e72d002bf94d950d830ae469d69a/app/main.py#L359","weight":0.65},{"kind":"complex-function","description":"build_qb_path_map in app/main.py: complexity 27, 30 lines","ref":"app/main.py","url":"https://github.com/raygan/mam-audiofinder/blob/08dc54ba85a6e72d002bf94d950d830ae469d69a/app/main.py#L41","weight":0.45},{"kind":"complex-function","description":"do_import in app/main.py: complexity 24, 69 lines","ref":"app/main.py","url":"https://github.com/raygan/mam-audiofinder/blob/08dc54ba85a6e72d002bf94d950d830ae469d69a/app/main.py#L574","weight":0.4},{"kind":"complex-function","description":"api_setup in app/main.py: complexity 20, 30 lines","ref":"app/main.py","url":"https://github.com/raygan/mam-audiofinder/blob/08dc54ba85a6e72d002bf94d950d830ae469d69a/app/main.py#L206","weight":0.3333333333333333},{"kind":"complex-function","description":"search.flatten in app/main.py: complexity 17, 23 lines","ref":"app/main.py","url":"https://github.com/raygan/mam-audiofinder/blob/08dc54ba85a6e72d002bf94d950d830ae469d69a/app/main.py#L283","weight":0.2833333333333333}],"data":{},"error":null},{"analyzer":"qual-duplication","pillar":"quality","status":"ok","tool_version":"repotrust-dup-w6","metrics":{"compared_lines":881.0,"duplicated_lines":48.0,"duplicated_share":0.0545,"files":3.0},"findings":[],"evidence":[{"kind":"duplicate-code","description":"6+ duplicated lines: app/main.py:396 and app/main.py:452","ref":"app/main.py","url":"https://github.com/raygan/mam-audiofinder/blob/08dc54ba85a6e72d002bf94d950d830ae469d69a/app/main.py#L396","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: app/static/app.js:92 and app/static/setup.js:42","ref":"app/static/app.js","url":"https://github.com/raygan/mam-audiofinder/blob/08dc54ba85a6e72d002bf94d950d830ae469d69a/app/static/app.js#L92","weight":0.3}],"data":{},"error":null},{"analyzer":"qual-lint","pillar":"quality","status":"ok","tool_version":"opengrep 1.33.1; rules f1d2b562b414","metrics":{"findings":3.0,"weighted_findings":3.0,"scanned_lines":1078.0,"category:correctness":3.0},"findings":[{"rule_id":"opengrep/javascript.lang.correctness.no-replaceall","severity":"medium","message":"The string method replaceAll is not supported in all versions of javascript, and is not supported by older browser versions. Consider using replace() with a regex as the first argument instead like mystring.replace(/bad/g, \"good\") instead of mystring.replaceAll(\"bad\", \"good\") (https://discourse.thre","path":"app/static/app.js","line":140,"fingerprint":"javascript.lang.correctness.no-replaceall:app/static/app.js:140"},{"rule_id":"opengrep/javascript.lang.correctness.no-replaceall","severity":"medium","message":"The string method replaceAll is not supported in all versions of javascript, and is not supported by older browser versions. Consider using replace() with a regex as the first argument instead like mystring.replace(/bad/g, \"good\") instead of mystring.replaceAll(\"bad\", \"good\") (https://discourse.thre","path":"app/static/app.js","line":140,"fingerprint":"javascript.lang.correctness.no-replaceall:app/static/app.js:140"},{"rule_id":"opengrep/javascript.lang.correctness.no-replaceall","severity":"medium","message":"The string method replaceAll is not supported in all versions of javascript, and is not supported by older browser versions. Consider using replace() with a regex as the first argument instead like mystring.replace(/bad/g, \"good\") instead of mystring.replaceAll(\"bad\", \"good\") (https://discourse.thre","path":"app/static/app.js","line":140,"fingerprint":"javascript.lang.correctness.no-replaceall:app/static/app.js:140"}],"evidence":[],"data":{},"error":null},{"analyzer":"qual-testing","pillar":"quality","status":"ok","tool_version":null,"metrics":{"check:has_tests":0.0,"check:test_ratio":0.0,"check:ci_present":0.0,"check:ci_runs_tests":0.0,"check:ci_runs_lint":0.0,"check:tests_cochange":0.0,"test_lines":0.0,"source_lines":1078.0,"test_ratio":0.0,"ci_files":0.0,"cochange_share":0.0,"cochange_commits":14.0},"findings":[],"evidence":[],"data":{"test_commands":[],"lint_commands":[]},"error":null},{"analyzer":"qual-docs","pillar":"quality","status":"ok","tool_version":null,"metrics":{"check:readme":1.0,"check:license":0.0,"check:contributing":0.0,"check:changelog":0.0,"readme_lines":106.0},"findings":[],"evidence":[{"kind":"docs","description":"README.md","ref":"README.md","url":null,"weight":0.0}],"data":{},"error":null},{"analyzer":"qual-type-safety","pillar":"quality","status":"ok","tool_version":null,"metrics":{"check:strict_config":0.0,"check:low_escape_density":1.0,"escapes":0.0,"escapes_per_kloc":0.0},"findings":[],"evidence":[],"data":{},"error":null}],"flags":[]}