{"schema_version":"2","scorer_version":"0.1.0","scoring_version":"prov-4+qual-2+sec-2","generated_at":"2026-11-13T23:33:02.431483Z","repo":{"ref":{"host":"github.com","owner":"phacility","name":"xhprof"},"default_branch":"master","clone_url":"https://github.com/phacility/xhprof.git","html_url":"https://github.com/phacility/xhprof","description":"XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based user interface.","stars":2592,"forks":900,"is_fork":false,"is_archived":false,"is_private":false,"size_kb":1723,"primary_language":"PHP","license_spdx":"Apache-2.0","created_at":"2009-04-02T05:04:34Z","pushed_at":"2019-05-28T23:19:41Z","security_policy_url":null,"distribution":{"owner_created_at":"2013-06-26T21:23:04Z","owner_type":"Organization","release_assets":[]}},"commit_sha":"0bbf2a2ac34f495e42aa852293fe0ed821659047","profile":{"lines_by_language":{"PHP":3540,"C":2097,"JavaScript":1257},"files_by_category":{"other":22,"source":17,"binary":6,"config":5,"test":5,"docs":2,"generated":1,"vendored":1},"source_lines":6799,"test_lines":95},"pillars":{"ai_provenance":{"score":0.0,"confidence":0.56,"coverage":1.0,"label":"none-detected","breakdown":{"attributed_share":0.0,"suspected_share":0.0,"estimated_share":0.0,"ai_artifacts":0.0,"flagged_work_units":0.0,"flagged_releases":null},"summary":"No AI attribution or AI-consistent velocity signals detected."},"quality":{"score":62.1,"confidence":0.9,"coverage":1.0,"label":"weak","breakdown":{"complexity":48.7,"duplication":78.6,"lint":100.0,"testing":39.0,"docs":65.0,"type_safety":null,"process":null},"summary":"Code quality is weak: test-to-source ratio 0.01, no CI test run detected; 24% of function code in complex or long functions; 4% duplicated lines. Weakest area: testing."},"security":{"score":73.2,"confidence":0.85,"coverage":1.0,"label":"adequate","breakdown":{"secrets":100.0,"sast":76.3,"dependencies":null,"ci_actions":null,"posture":0.0,"scorecard":null},"summary":"Security posture is adequate: 1 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":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"error":"no registry dependencies declared"},{"analyzer":"ai-attribution","pillar":"ai_provenance","status":"ok","tool_version":"signatures-v1","metrics":{"commits":64.0,"attributed_commits":0.0,"attributed_commit_share":0.0,"effective_loc":7162.0,"attributed_loc":0.0,"attributed_loc_share":0.0,"tools_detected":0.0},"findings":[],"evidence":[],"data":{"attributed_loc_by_commit":{},"tools":{},"monthly":{"2009-03":{"loc":6347,"attributed_loc":0},"2009-04":{"loc":1,"attributed_loc":0},"2009-05":{"loc":332,"attributed_loc":0},"2009-06":{"loc":1,"attributed_loc":0},"2009-07":{"loc":0,"attributed_loc":0},"2010-04":{"loc":204,"attributed_loc":0},"2011-07":{"loc":20,"attributed_loc":0},"2011-12":{"loc":4,"attributed_loc":0},"2012-02":{"loc":44,"attributed_loc":0},"2012-03":{"loc":0,"attributed_loc":0},"2012-08":{"loc":0,"attributed_loc":0},"2012-10":{"loc":0,"attributed_loc":0},"2012-11":{"loc":1,"attributed_loc":0},"2012-12":{"loc":0,"attributed_loc":0},"2013-01":{"loc":51,"attributed_loc":0},"2013-02":{"loc":0,"attributed_loc":0},"2013-03":{"loc":6,"attributed_loc":0},"2013-04":{"loc":4,"attributed_loc":0},"2013-05":{"loc":0,"attributed_loc":0},"2013-07":{"loc":1,"attributed_loc":0},"2013-10":{"loc":4,"attributed_loc":0},"2014-01":{"loc":0,"attributed_loc":0},"2014-04":{"loc":2,"attributed_loc":0},"2014-08":{"loc":122,"attributed_loc":0},"2015-02":{"loc":18,"attributed_loc":0}}},"error":null},{"analyzer":"ai-artifacts","pillar":"ai_provenance","status":"ok","tool_version":"signatures-v1","metrics":{"artifacts":0.0,"workflow_agents":0.0,"tools_configured":0.0},"findings":[],"evidence":[],"data":{"artifacts":[],"workflows":[],"tools":[]},"error":null},{"analyzer":"ai-velocity","pillar":"ai_provenance","status":"ok","tool_version":"prov-4","metrics":{"work_units":28.0,"flagged_units":0.0,"pre_ai_era_bursts":0.0,"pre_ai_era_measured_loc":802.0,"pre_ai_era_burst_loc":0.0,"measured_loc":802.0,"flagged_loc":0.0,"flagged_loc_share":0.0,"max_loc_per_hour":167.07985010089362,"median_loc_per_hour":69.25,"pr_timed_units":0.0,"excluded_import_loc":6342.0},"findings":[],"evidence":[],"data":{"flagged_loc_by_commit":{},"excluded_import_commits":["58f6d12cdea501b96ea26172e363eb3a5aa2433a"]},"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":6799.0,"index":0.0,"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":0.0,"per_kloc:emoji_in_code":0.0,"files:emoji_in_code":0.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":1.0,"findings_medium":18.0,"findings_low":0.0,"weighted_findings":5.25,"scanned_lines":6799.0,"parse_errors":1.0},"findings":[{"rule_id":"opengrep/php.lang.security.exec-use","severity":"high","message":"Executing non-constant commands. This can lead to command injection. [confidence low]","path":"xhprof_lib/utils/callgraph_utils.php","line":112,"fingerprint":"php.lang.security.exec-use:xhprof_lib/utils/callgraph_utils.php:112"},{"rule_id":"opengrep/javascript.jquery.security.audit.jquery-insecure-selector","severity":"medium","message":"User controlled data in a `$(...)` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"xhprof_html/jquery/jquery.autocomplete.js","line":69,"fingerprint":"javascript.jquery.security.audit.jquery-insecure-selector:xhprof_html/jquery/jquery.autocomplete.js:69"},{"rule_id":"opengrep/javascript.jquery.security.audit.jquery-insecure-selector","severity":"medium","message":"User controlled data in a `$(...)` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"xhprof_html/jquery/jquery.autocomplete.js","line":84,"fingerprint":"javascript.jquery.security.audit.jquery-insecure-selector:xhprof_html/jquery/jquery.autocomplete.js:84"},{"rule_id":"opengrep/javascript.jquery.security.audit.jquery-insecure-selector","severity":"medium","message":"User controlled data in a `$(...)` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"xhprof_html/jquery/jquery.autocomplete.js","line":197,"fingerprint":"javascript.jquery.security.audit.jquery-insecure-selector:xhprof_html/jquery/jquery.autocomplete.js:197"},{"rule_id":"opengrep/javascript.lang.security.audit.detect-non-literal-regexp","severity":"medium","message":"RegExp() called with a `term` function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled [confidence low]","path":"xhprof_html/jquery/jquery.autocomplete.js","line":409,"fingerprint":"javascript.lang.security.audit.detect-non-literal-regexp:xhprof_html/jquery/jquery.autocomplete.js:409"},{"rule_id":"opengrep/javascript.jquery.security.audit.jquery-insecure-selector","severity":"medium","message":"User controlled data in a `$(...)` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"xhprof_html/jquery/jquery.autocomplete.js","line":577,"fingerprint":"javascript.jquery.security.audit.jquery-insecure-selector:xhprof_html/jquery/jquery.autocomplete.js:577"},{"rule_id":"opengrep/javascript.jquery.security.audit.jquery-insecure-selector","severity":"medium","message":"User controlled data in a `$(...)` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"xhprof_html/jquery/jquery.autocomplete.js","line":580,"fingerprint":"javascript.jquery.security.audit.jquery-insecure-selector:xhprof_html/jquery/jquery.autocomplete.js:580"},{"rule_id":"opengrep/javascript.jquery.security.audit.jquery-insecure-method","severity":"medium","message":"User controlled data in a jQuery's `.html(...)` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"xhprof_html/jquery/jquery.autocomplete.js","line":648,"fingerprint":"javascript.jquery.security.audit.jquery-insecure-method:xhprof_html/jquery/jquery.autocomplete.js:648"},{"rule_id":"opengrep/javascript.jquery.security.audit.prohibit-jquery-html","severity":"medium","message":"JQuery's `html` function is susceptible to Cross Site Scripting (XSS) attacks. If you're just passing text, consider `text` instead. Otherwise, use a function that escapes HTML such as edX's `HtmlUtils.setHtml()`. [confidence low]","path":"xhprof_html/jquery/jquery.autocomplete.js","line":648,"fingerprint":"javascript.jquery.security.audit.prohibit-jquery-html:xhprof_html/jquery/jquery.autocomplete.js:648"},{"rule_id":"opengrep/javascript.jquery.security.audit.jquery-insecure-selector","severity":"medium","message":"User controlled data in a `$(...)` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"xhprof_html/jquery/jquery.autocomplete.js","line":700,"fingerprint":"javascript.jquery.security.audit.jquery-insecure-selector:xhprof_html/jquery/jquery.autocomplete.js:700"},{"rule_id":"opengrep/javascript.jquery.security.audit.jquery-insecure-selector","severity":"medium","message":"User controlled data in a `$(...)` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"xhprof_html/jquery/jquery.autocomplete.js","line":702,"fingerprint":"javascript.jquery.security.audit.jquery-insecure-selector:xhprof_html/jquery/jquery.autocomplete.js:702"},{"rule_id":"opengrep/javascript.jquery.security.audit.prohibit-jquery-html","severity":"medium","message":"JQuery's `html` function is susceptible to Cross Site Scripting (XSS) attacks. If you're just passing text, consider `text` instead. Otherwise, use a function that escapes HTML such as edX's `HtmlUtils.setHtml()`. [confidence low]","path":"xhprof_html/jquery/jquery.tooltip.js","line":87,"fingerprint":"javascript.jquery.security.audit.prohibit-jquery-html:xhprof_html/jquery/jquery.tooltip.js:87"},{"rule_id":"opengrep/javascript.jquery.security.audit.jquery-insecure-method","severity":"medium","message":"User controlled data in a jQuery's `.appendTo(...)` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"xhprof_html/jquery/jquery.tooltip.js","line":100,"fingerprint":"javascript.jquery.security.audit.jquery-insecure-method:xhprof_html/jquery/jquery.tooltip.js:100"},{"rule_id":"opengrep/javascript.jquery.security.audit.jquery-insecure-selector","severity":"medium","message":"User controlled data in a `$(...)` is an anti-pattern that can lead to XSS vulnerabilities [confidence low]","path":"xhprof_html/jquery/jquery.tooltip.js","line":100,"fingerprint":"javascript.jquery.security.audit.jquery-insecure-selector:xhprof_html/jquery/jquery.tooltip.js:100"},{"rule_id":"opengrep/javascript.jquery.security.audit.prohibit-jquery-html","severity":"medium","message":"JQuery's `html` function is susceptible to Cross Site Scripting (XSS) attacks. If you're just passing text, consider `text` instead. Otherwise, use a function that escapes HTML such as edX's `HtmlUtils.setHtml()`. [confidence low]","path":"xhprof_html/jquery/jquery.tooltip.js","line":152,"fingerprint":"javascript.jquery.security.audit.prohibit-jquery-html:xhprof_html/jquery/jquery.tooltip.js:152"},{"rule_id":"opengrep/javascript.jquery.security.audit.prohibit-jquery-html","severity":"medium","message":"JQuery's `html` function is susceptible to Cross Site Scripting (XSS) attacks. If you're just passing text, consider `text` instead. Otherwise, use a function that escapes HTML such as edX's `HtmlUtils.setHtml()`. [confidence low]","path":"xhprof_html/jquery/jquery.tooltip.js","line":157,"fingerprint":"javascript.jquery.security.audit.prohibit-jquery-html:xhprof_html/jquery/jquery.tooltip.js:157"},{"rule_id":"opengrep/javascript.jquery.security.audit.prohibit-jquery-html","severity":"medium","message":"JQuery's `html` function is susceptible to Cross Site Scripting (XSS) attacks. If you're just passing text, consider `text` instead. Otherwise, use a function that escapes HTML such as edX's `HtmlUtils.setHtml()`. [confidence low]","path":"xhprof_html/jquery/jquery.tooltip.js","line":166,"fingerprint":"javascript.jquery.security.audit.prohibit-jquery-html:xhprof_html/jquery/jquery.tooltip.js:166"},{"rule_id":"opengrep/javascript.jquery.security.audit.prohibit-jquery-html","severity":"medium","message":"JQuery's `html` function is susceptible to Cross Site Scripting (XSS) attacks. If you're just passing text, consider `text` instead. Otherwise, use a function that escapes HTML such as edX's `HtmlUtils.setHtml()`. [confidence low]","path":"xhprof_html/jquery/jquery.tooltip.js","line":172,"fingerprint":"javascript.jquery.security.audit.prohibit-jquery-html:xhprof_html/jquery/jquery.tooltip.js:172"},{"rule_id":"opengrep/php.lang.security.unserialize-use","severity":"medium","message":"Calling `unserialize()` with user input in the pattern can lead to arbitrary code execution. Consider using JSON or structured data approaches (e.g. Google Protocol Buffers). [confidence low]","path":"xhprof_lib/utils/xhprof_runs.php","line":121,"fingerprint":"php.lang.security.unserialize-use:xhprof_lib/utils/xhprof_runs.php:121"}],"evidence":[],"data":{"rulesets":["php","c","javascript"]},"error":null},{"analyzer":"sec-deps","pillar":"security","status":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"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":224.0,"function_nloc":3390.0,"mean_ccn":3.56,"p90_ccn":7.0,"complex_functions":5.0,"long_functions":4.0,"many_param_functions":0.0,"risky_nloc_share":0.2395},"findings":[],"evidence":[{"kind":"complex-function","description":"xhprof_generate_dot_script in xhprof_lib/utils/callgraph_utils.php: complexity 51, 191 lines","ref":"xhprof_lib/utils/callgraph_utils.php","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_lib/utils/callgraph_utils.php#L167","weight":0.85},{"kind":"complex-function","description":"symbol_report in xhprof_lib/display/xhprof.php: complexity 27, 212 lines","ref":"xhprof_lib/display/xhprof.php","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_lib/display/xhprof.php#L1036","weight":0.45},{"kind":"complex-function","description":"xhprof_aggregate_runs in xhprof_lib/utils/xhprof_lib.php: complexity 22, 82 lines","ref":"xhprof_lib/utils/xhprof_lib.php","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_lib/utils/xhprof_lib.php#L320","weight":0.36666666666666664},{"kind":"complex-function","description":"xhprof_render_link in xhprof_lib/display/xhprof.php: complexity 17, 51 lines","ref":"xhprof_lib/display/xhprof.php","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_lib/display/xhprof.php#L147","weight":0.2833333333333333},{"kind":"complex-function","description":"(anonymous) in xhprof_html/jquery/jquery.autocomplete.js: complexity 16, 53 lines","ref":"xhprof_html/jquery/jquery.autocomplete.js","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_html/jquery/jquery.autocomplete.js#L92","weight":0.26666666666666666},{"kind":"complex-function","description":"profiler_report in xhprof_lib/display/xhprof.php: complexity 12, 104 lines","ref":"xhprof_lib/display/xhprof.php","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_lib/display/xhprof.php#L441","weight":0.2},{"kind":"complex-function","description":"full_report in xhprof_lib/display/xhprof.php: complexity 11, 119 lines","ref":"xhprof_lib/display/xhprof.php","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_lib/display/xhprof.php#L781","weight":0.18333333333333332}],"data":{},"error":null},{"analyzer":"qual-duplication","pillar":"quality","status":"ok","tool_version":"repotrust-dup-w6","metrics":{"compared_lines":4650.0,"duplicated_lines":187.0,"duplicated_share":0.0402,"files":17.0},"findings":[],"evidence":[{"kind":"duplicate-code","description":"6+ duplicated lines: extension/php_xhprof.h:2 and extension/xhprof.c:2","ref":"extension/php_xhprof.h","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/extension/php_xhprof.h#L2","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: xhprof_html/callgraph.php:1 and xhprof_html/index.php:1","ref":"xhprof_html/callgraph.php","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_html/callgraph.php#L1","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: xhprof_html/index.php:10 and xhprof_lib/display/xhprof.php:10","ref":"xhprof_html/index.php","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_html/index.php#L10","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: xhprof_html/js/xhprof_report.js:64 and xhprof_html/js/xhprof_report.js:125","ref":"xhprof_html/js/xhprof_report.js","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_html/js/xhprof_report.js#L64","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: xhprof_lib/display/xhprof.php:744 and xhprof_lib/display/xhprof.php:1163","ref":"xhprof_lib/display/xhprof.php","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_lib/display/xhprof.php#L744","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: xhprof_lib/utils/callgraph_utils.php:420 and xhprof_lib/utils/callgraph_utils.php:457","ref":"xhprof_lib/utils/callgraph_utils.php","url":"https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_lib/utils/callgraph_utils.php#L420","weight":0.3}],"data":{},"error":null},{"analyzer":"qual-lint","pillar":"quality","status":"ok","tool_version":"opengrep 1.33.1; rules f1d2b562b414","metrics":{"findings":0.0,"weighted_findings":0.0,"scanned_lines":6799.0},"findings":[],"evidence":[],"data":{},"error":null},{"analyzer":"qual-testing","pillar":"quality","status":"ok","tool_version":null,"metrics":{"check:has_tests":1.0,"check:test_ratio":0.0279,"check:ci_present":1.0,"check:ci_runs_tests":0.0,"check:ci_runs_lint":0.0,"check:tests_cochange":0.3333,"test_lines":95.0,"source_lines":6799.0,"test_ratio":0.014,"ci_files":1.0,"cochange_share":0.0833,"cochange_commits":36.0},"findings":[],"evidence":[{"kind":"ci","description":"CI config: .travis.yml","ref":".travis.yml","url":null,"weight":0.0}],"data":{"test_commands":[],"lint_commands":[]},"error":null},{"analyzer":"qual-docs","pillar":"quality","status":"ok","tool_version":null,"metrics":{"check:readme":0.5,"check:license":1.0,"check:contributing":0.0,"check:changelog":1.0,"readme_lines":4.0},"findings":[],"evidence":[{"kind":"docs","description":"README","ref":"README","url":null,"weight":0.0},{"kind":"docs","description":"LICENSE","ref":"LICENSE","url":null,"weight":0.0},{"kind":"docs","description":"CHANGELOG","ref":"CHANGELOG","url":null,"weight":0.0}],"data":{},"error":null},{"analyzer":"qual-type-safety","pillar":"quality","status":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"error":null}],"flags":[]}