Skip to content

Commit

Permalink
plugins/semgrep: fix ambigious semgrep hook naming
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyw committed Mar 7, 2024
1 parent 9409479 commit 2f274c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py/plugins/semgrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def handle_args(self, parser, args, props):
parser.error("'--semgrep-rules-repo' is required to run semgrep scan")
return 1

# download semgrep rules
def fetch_semgrep_rules_hook(results, props):
# install semgrep cli and download semgrep rules
def prepare_semgrep_runtime_hook(results, props):
# target dir where semgrep cli and its dependencies are installed
semgrep_lib_dir = os.path.join(results.tmpdir, "semgrep_lib")
try:
Expand Down Expand Up @@ -136,7 +136,7 @@ def fetch_semgrep_rules_hook(results, props):
]
return 0

props.pre_mock_hooks += [fetch_semgrep_rules_hook]
props.pre_mock_hooks += [prepare_semgrep_runtime_hook]

def scan_hook(results, mock, props):
semgrep_lib_dir = os.path.join(results.tmpdir, "semgrep_lib")
Expand Down

0 comments on commit 2f274c4

Please sign in to comment.