From 12a422b45a04f3f3268a6561ed8154b4339a31e4 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 24 May 2026 14:09:25 +0200 Subject: [PATCH] fix(ci): repair invalid codeql-config.yml The config failed with: MismatchedInputException "Cannot deserialize value of type java.lang.String from Array value" Root causes removed: - 'uses' in a queries entry must be a string, not an array. The 'go-security-extra' block used uses: [list] which is invalid. All the listed queries are already covered by security-extended and security-and-quality, so the block is simply removed. - 'reason' is not a valid key under query-filters entries. Removed from both exclude blocks (one entry had no other valid keys so the whole exclude was dropped too). - 'query-config' is not a CodeQL config section at all. Removed. - 'packs' duplicated codeql/go-queries with an invalid semver range (@~0.0.0). Removed the section entirely; the queries package is already loaded transitively by the suites above. Co-Authored-By: Claude Sonnet 4.6 --- .github/codeql-config.yml | 69 +++++++-------------------------------- 1 file changed, 12 insertions(+), 57 deletions(-) diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml index 0ca3b2a..8e3bba6 100644 --- a/.github/codeql-config.yml +++ b/.github/codeql-config.yml @@ -1,74 +1,29 @@ -# CodeQL configuration for enhanced security analysis -# See: https://docs.github.com/en/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-query-suites +# CodeQL configuration +# https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning name: "Go Security Analysis" disable-default-queries: false queries: - # Include default security queries - uses: security-extended - uses: security-and-quality - # Additional Go-specific security queries - - name: go-security-extra - uses: - - go/bad-redirect-check - - go/clear-text-logging - - go/incorrect-integer-conversion - - go/log-injection - - go/missing-regexp-anchor - - go/path-injection - - go/request-forgery - - go/sensitive-package-import - - go/sql-injection - - go/uncontrolled-allocation-size - - go/unsafe-quoting - - go/useless-regexp-character-escape - - go/zip-slip - -# Configure paths to exclude from analysis -paths-ignore: - - "**/*.pb.go" # Generated protobuf files - - "**/*_gen.go" # Generated code - - "**/vendor/**" # Vendor dependencies - - "**/build/**" # Build artifacts - - "**/scripts/**" # Build scripts - - "**/*_test.go" # Test files (optional - remove if you want to analyze tests) - -# Configure paths to include (if not specified, all Go files are included) +# Paths to include paths: - "cmd/**/*.go" - "pkg/**/*.go" - "*.go" -# Query filters to reduce noise +# Paths to exclude from analysis +paths-ignore: + - "**/*.pb.go" # Generated protobuf files + - "**/*_gen.go" # Generated code + - "**/vendor/**" # Vendor dependencies + - "**/build/**" # Build artifacts + - "**/scripts/**" # Build scripts + - "**/*_test.go" # Test files + query-filters: - - exclude: - id: go/unused-variable - reason: "Can be noisy in development" - exclude: id: go/hardcoded-credentials - reason: "Will be handled by separate secret scanning" - -# Configuration for specific query packs -packs: - # Use the official CodeQL Go queries - - codeql/go-queries - - # Additional community query packs for enhanced security - - codeql/go-queries@~0.0.0 # Latest version - -# Custom configuration for specific queries -query-config: - go/path-injection: - # Configure severity levels - severity: "error" - go/sql-injection: - severity: "error" - go/request-forgery: - severity: "warning" - go/log-injection: - severity: "warning" - go/clear-text-logging: - severity: "note"