Skip to content

Commit 9f2d4d9

Browse files
[Bug] Makefile test-remote-cli Defined Twice (#4751)
* Minor Bug Fixes for Paths
1 parent e3841fb commit 9f2d4d9

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
### detection-rules
33
#################
44

5+
APP_NAME := detection-rules
56
VENV := ./env/detection-rules-build
67
VENV_BIN := $(VENV)/bin
78
PYTHON := $(VENV_BIN)/python
@@ -26,7 +27,7 @@ deps: $(VENV)
2627
$(PIP) install lib/kql
2728

2829
.PHONY: hunting-deps
29-
deps: $(VENV)
30+
hunting-deps: $(VENV)
3031
@echo "Installing all dependencies..."
3132
$(PIP) install .[hunting]
3233

@@ -58,13 +59,13 @@ test-remote-cli: $(VENV) deps
5859
@./detection_rules/etc/test_remote_cli.bash
5960

6061
.PHONY: test-hunting-cli
61-
test-remote-cli: $(VENV) hunting-deps
62+
test-hunting-cli: $(VENV) hunting-deps
6263
@echo "Executing test_hunting_cli script..."
6364
@./detection_rules/etc/test_hunting_cli.bash
6465

6566
.PHONY: release
6667
release: deps
67-
@echo "RELEASE: $(app_name)"
68+
@echo "RELEASE: $(APP_NAME)"
6869
$(PYTHON) -m detection_rules dev build-release --generate-navigator
6970
rm -rf dist
7071
mkdir dist

detection_rules/etc/test_hunting_cli.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ echo "Refreshing index"
1515
python -m hunting refresh-index
1616

1717
echo "Generating Markdown: initial_access_higher_than_average_failed_authentication.toml"
18-
python -m hunting generate-markdown /Users/tdejesus/code/src/detection-rules/hunting/okta/queries/initial_access_higher_than_average_failed_authentication.toml
18+
python -m hunting generate-markdown hunting/okta/queries/initial_access_higher_than_average_failed_authentication.toml
1919

2020
echo "Running Query: low_volume_external_network_connections_from_process.toml"
2121
echo "Requires .detection-rules-cfg.json credentials file set."
22-
python -m hunting run-query --file-path /Users/tdejesus/code/src/detection-rules/hunting/linux/queries/low_volume_external_network_connections_from_process.toml --all
22+
python -m hunting run-query --file-path hunting/linux/queries/low_volume_external_network_connections_from_process.toml --all
2323

2424
echo "Viewing Hunt: 12526f14-5e35-4f5f-884c-96c6a353a544"
2525
python -m hunting view-hunt --uuid 12526f14-5e35-4f5f-884c-96c6a353a544 --format json

hunting/markdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def update_or_add_entry(self, hunt_config: Hunt, toml_path: Path) -> None:
9393

9494
entry = {
9595
'name': hunt_config.name,
96-
'path': f"./{toml_path.relative_to(self.base_path).as_posix()}",
96+
'path': f"./{toml_path.resolve().relative_to(self.base_path).as_posix()}",
9797
'mitre': hunt_config.mitre
9898
}
9999

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "detection_rules"
3-
version = "1.2.14"
3+
version = "1.2.15"
44
description = "Detection Rules is the home for rules used by Elastic Security. This repository is used for the development, maintenance, testing, validation, and release of rules for Elastic Security’s Detection Engine."
55
readme = "README.md"
66
requires-python = ">=3.12"

0 commit comments

Comments
 (0)