Skip to content

Go: hashicorp/hcl models #19806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

egregius313
Copy link
Contributor

Added models for the github.com/hashicorp/hcl packages.

@Copilot Copilot AI review requested due to automatic review settings June 17, 2025 21:21
@egregius313 egregius313 requested a review from a team as a code owner June 17, 2025 21:21
@github-actions github-actions bot added the Go label Jun 17, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds CodeQL extension models for the HashiCorp HCL packages, enabling taint tracking and source/sink identification in hcl and hclsimple.

  • Introduce package grouping entries for hcl1 and hclsimple
  • Define sourceModel entries for Decode/DecodeFile methods
  • Add sinkModel and summaryModel entries to capture file inputs and taint propagation
Comments suppressed due to low confidence (2)

go/ql/lib/ext/github.com.hashicorp.model.yml:13

  • The sourceModel entry for hclsimple.DecodeFile uses Argument[2], but DecodeFile only has two parameters (index 0 for the file path and index 1 for the destination). Update this to Argument[0] to correctly model the file input.
      - ["group:hclsimple", "", False, "DecodeFile", "", "", "Argument[2]", "file", "manual"]

go/ql/lib/ext/github.com.hashicorp.model.yml:26

  • The summaryModel entry for hclsimple.Decode references Argument[3], but Decode only takes two parameters (Argument[0] and Argument[1]). Verify the intended method and adjust the argument indices (or method name) to match the actual function signature.
      - ["group:hclsimple", "", False, "Decode", "", "", "Argument[1]", "Argument[3]", "taint", "manual"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant