Skip to content

Commit

Permalink
Fix GitLab healthcheck script false positive (chainguard-dev#364)
Browse files Browse the repository at this point in the history
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
  • Loading branch information
egibs authored Jul 15, 2024
1 parent e207119 commit 487dbab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rules/shell/bash_dev_tcp.yara
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ rule bash_dev_tcp_hardcoded_ip : critical {
meta:
description = "hardcoded /dev/tcp host:port"
strings:
$dev_tcp = /\/dev\/tcp\/[\w\.]{8,16}\/\d{1,6}/
$dev_tcp = /\/dev\/tcp\/[\w\.]{8,16}\/\d{1,6}/
$not_comment = "# Check that both our processes are running on their tcp port"
$not_get = "GET / HTTP/1.1 >"
$not_localhost_8080 = "/dev/tcp/127.0.0.1/8080"
condition:
$dev_tcp
$dev_tcp and none of ($not_*)
}

0 comments on commit 487dbab

Please sign in to comment.