You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -63007,39 +63007,30 @@ function registerCodeQLTools(server) {
63007
63007
registerRegisterDatabaseTool(server);
63008
63008
}
63009
63009
63010
+
// src/resources/getting-started.md
63011
+
var getting_started_default = "# CodeQL Getting Started Guide\n\n## What is CodeQL?\n\nCodeQL is a semantic code analysis engine that allows you to write queries to find problems in source code.\n\n## Installation\n\n1. Download CodeQL CLI from GitHub releases\n2. Add to PATH\n3. Verify: `codeql version`\n\n## First Steps\n\n### 1. Create a Database\n\n```bash\ncodeql database create my-db --language=java --source-root=./src\n```\n\n### 2. Run Analysis\n\n```bash\ncodeql database analyze my-db --format=sarif --output=results.sarif\n```\n\n## Resources\n\n- [CodeQL Documentation](https://codeql.github.com/)\n- [GitHub Security Lab](https://securitylab.github.com/)\n";
63012
+
63013
+
// src/resources/performance-patterns.md
63014
+
var performance_patterns_default = '# Performance Optimization Patterns\n\n## Efficient Joins\n\n```ql\n// Efficient - Proper join condition\nfrom Method m, MethodAccess ma\nwhere ma.getMethod() = m\nselect m, ma\n```\n\n## Early Filtering\n\n```ql\n// Filter early for better performance\nfrom Expr e\nwhere e.getEnclosingCallable().getDeclaringType().hasName("Controller")\n and e.getType().hasName("String")\n```\n';
63015
+
63016
+
// src/resources/query-basics.md
63017
+
var query_basics_default = '# CodeQL Query Basics\n\n## Query Structure\n\n```ql\n/**\n * @name Query Name\n * @description What this query finds\n */\n\nimport language\n\nfrom Variable declarations\nwhere Conditions\nselect Results\n```\n\n## Core Clauses\n\n- **from**: Declares variables and types\n- **where**: Specifies conditions\n- **select**: Defines output\n\n## Example\n\n```ql\nfrom Method m\nwhere m.getName() = "execute"\nselect m, "Found execute method"\n```\n';
63018
+
63019
+
// src/resources/security-templates.md
63020
+
var security_templates_default = '# Security Query Templates\n\n## SQL Injection Detection (Go)\n\nBased on the real CodeQL query from github/codeql repository:\n\n```ql\n/**\n * @name Database query built from user-controlled sources\n * @description Building a database query from user-controlled sources is vulnerable to insertion of\n * malicious code by the user.\n * @kind path-problem\n * @problem.severity error\n * @security-severity 8.8\n * @precision high\n * @id go/sql-injection\n * @tags security\n * external/cwe/cwe-089\n */\n\nimport go\nimport semmle.go.security.SqlInjection\nimport SqlInjection::Flow::PathGraph\n\nfrom SqlInjection::Flow::PathNode source, SqlInjection::Flow::PathNode sink\nwhere SqlInjection::Flow::flowPath(source, sink)\nselect sink.getNode(), source, sink, "This query depends on a $@.", source.getNode(),\n "user-provided value"\n```\n\n## Cross-Site Scripting (XSS) Template\n\n```ql\n/**\n * @name Cross-site scripting\n * @description Writing user input directly to a web page\n * allows for a cross-site scripting vulnerability.\n * @kind path-problem\n * @problem.severity error\n * @security-severity 6.1\n * @precision high\n * @id js/xss\n * @tags security\n * external/cwe/cwe-079\n */\n\nimport javascript\nimport semmle.javascript.security.dataflow.DomBasedXss\nimport DomBasedXss::Flow::PathGraph\n\nfrom DomBasedXss::Flow::PathNode source, DomBasedXss::Flow::PathNode sink\nwhere DomBasedXss::Flow::flowPath(source, sink)\nselect sink.getNode(), source, sink, "Cross-site scripting vulnerability due to $@.",\n source.getNode(), "user-provided value"\n```\n';
63021
+
63010
63022
// src/lib/resources.ts
63011
-
import { readFileSync as readFileSync11 } from "fs";
63012
-
import { join as join16, dirname as dirname8 } from "path";
63013
-
import { fileURLToPath as fileURLToPath3 } from "url";
63014
-
var __filename2 = fileURLToPath3(import.meta.url);
0 commit comments