Skip to content

CVE-2025-46569: Improper Control of Generation of Code ('Code Injecton')#2177

Closed
jdesouza wants to merge 1 commit intoaquasecurity:masterfrom
jdesouza:master
Closed

CVE-2025-46569: Improper Control of Generation of Code ('Code Injecton')#2177
jdesouza wants to merge 1 commit intoaquasecurity:masterfrom
jdesouza:master

Conversation

@jdesouza
Copy link
Copy Markdown
Contributor

@jdesouza jdesouza commented May 12, 2025

CVE-2025-46569: Improper Control of Generation of Code ('Code Injecton')
https://avd.aquasec.com/nvd/2025/cve-2025-46569/

@jdesouza jdesouza changed the title CVE-2025-46569: Improper Control of Generation of Code ('Code Injecti… CVE-2025-46569: Improper Control of Generation of Code ('Code Injecton') May 12, 2025
@simar7
Copy link
Copy Markdown
Member

simar7 commented May 13, 2025

tfsec does not run OPA in server mode.

@jdesouza
Copy link
Copy Markdown
Contributor Author

tfsec does not run OPA in server mode.

Cool, thanks for your replay.
Anyways the CVE keep been caught by Trivy scanning and customers are always questioning/concerning about Critical or High CVEs.

@jdesouza
Copy link
Copy Markdown
Contributor Author

@simar7 - I would move to trivy but last year when we tried to move to trivy to replace tfsec we missed some features:

  • validating custom policies against terraform plan and not to the original files
  • we would need to use Rego instead of current tfsec approach for creating custom checks
    Are those statements still valid? I mea,n is there a way to move to trivy using old tfsec custom checks against original terraform files and not plans?

@simar7
Copy link
Copy Markdown
Member

simar7 commented May 22, 2025

@simar7 - I would move to trivy but last year when we tried to move to trivy to replace tfsec we missed some features:

  • validating custom policies against terraform plan and not to the original files

Do you have an example? Trivy is able to scan terraform plan as well. https://trivy.dev/latest/docs/coverage/iac/terraform/

  • we would need to use Rego instead of current tfsec approach for creating custom checks

Yes we no longer have support for checks written in Go. All custom checks must be written in Rego. But if this is an issue, I would like to understand what is the friction point. We have written some docs on writing custom checks https://trivy.dev/latest/tutorials/misconfiguration/custom-checks/ but if they are not enough or if you are running into other issues please let us know.

@jdesouza
Copy link
Copy Markdown
Contributor Author

jdesouza commented May 22, 2025

@simar7 - I would move to trivy but last year when we tried to move to trivy to replace tfsec we missed some features:

  • validating custom policies against terraform plan and not to the original files

Do you have an example? Trivy is able to scan terraform plan as well. https://trivy.dev/latest/docs/coverage/iac/terraform/

  • we would need to use Rego instead of current tfsec approach for creating custom checks

Yes we no longer have support for checks written in Go. All custom checks must be written in Rego. But if this is an issue, I would like to understand what is the friction point. We have written some docs on writing custom checks https://trivy.dev/latest/tutorials/misconfiguration/custom-checks/ but if they are not enough or if you are running into other issues please let us know.

  • It's the opposite, we scan terraform files with tfsec in a repo but looks like trivy scans only the plan right?
  • The point of friction is migrating the existing checks to Rego; also some people don't love Rego

@simar7
Copy link
Copy Markdown
Member

simar7 commented May 22, 2025

As mentioned In the docs Trivy can scan both.

@simar7 simar7 mentioned this pull request Jun 3, 2025
@jdesouza jdesouza closed this Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants