Repository navigation
test(security): record a tflint 0.65.0 run - #2729
Merged
Merged
Conversation
Owner
Author
|
Targeted tests (all passed, 58 tests): tests/security, tests/test_scanner_contract.py, tests/test_security_gitleaks.py, tests/test_security_kubeconform.py, tests/commands/test_k8s_audit.py, tests/test_tools_lock.py. Fail-to-pass on origin/main ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Record a run of the pinned tflint 0.65.0 with findings, so the tflint adapter is held to the real output of the tool.
What and why
tests/fixtures/scanner_runs/runs_with_findings.jsongets the keytflint. It holds the exit code (2), the stdout and the empty stderr oftflint --format json --recursive, run with the pinned 0.65.0 binary over a tree with two.tffiles, one inmodules/network. The report has sixwarningissues of the bundledterraformruleset 0.15.0. Each file name is relative to the tree, and--recursivegives the module file asmodules/network/main.tf.tests/security/test_tflint.pyreads the recording throughscript_run_with_findingsand asserts the command, the statusranand all six findings with rule, message, severity (MEDIUM) and relative file name.test_each_run_with_findings_is_of_the_version_the_tools_lock_pinsnow holds the recording to the locked tflint version.fixable,fixedandcallerson purpose:devopsnever runstflint --fix, and the finding already names the file and the line.Change: openspec/changes/archive/2026-10-30-2427-record-tflint-run/
Closes #2427