mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-25 07:31:05 -05:00
Match AWS States file using "States" JSON key (#1949)
* Match AWS states file using "States" key Matching only on `"Resource": "arn` is too wide and will match also aws json policy files * Update detectFiles.sh * spacing Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
This commit is contained in:
parent
658557447c
commit
a3ad489783
1 changed files with 2 additions and 1 deletions
|
@ -203,7 +203,8 @@ DetectAWSStatesFIle() {
|
|||
###############################
|
||||
# check if file has resources #
|
||||
###############################
|
||||
if grep -q '"Resource": *"arn"*' "${FILE}"; then
|
||||
if grep -q '"Resource": *"arn' "${FILE}" &&
|
||||
grep -q '"States"' "${FILE}"; then
|
||||
# Found it
|
||||
return 0
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue