Skip to content

[Bug] Makefile test-remote-cli Defined Twice #4751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
### detection-rules
#################

APP_NAME := detection-rules
VENV := ./env/detection-rules-build
VENV_BIN := $(VENV)/bin
PYTHON := $(VENV_BIN)/python
Expand All @@ -26,7 +27,7 @@ deps: $(VENV)
$(PIP) install lib/kql

.PHONY: hunting-deps
deps: $(VENV)
hunting-deps: $(VENV)
@echo "Installing all dependencies..."
$(PIP) install .[hunting]

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

.PHONY: test-hunting-cli
test-remote-cli: $(VENV) hunting-deps
test-hunting-cli: $(VENV) hunting-deps
@echo "Executing test_hunting_cli script..."
@./detection_rules/etc/test_hunting_cli.bash

.PHONY: release
release: deps
@echo "RELEASE: $(app_name)"
@echo "RELEASE: $(APP_NAME)"
$(PYTHON) -m detection_rules dev build-release --generate-navigator
rm -rf dist
mkdir dist
Expand Down
4 changes: 2 additions & 2 deletions detection_rules/etc/test_hunting_cli.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ echo "Refreshing index"
python -m hunting refresh-index

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

echo "Running Query: low_volume_external_network_connections_from_process.toml"
echo "Requires .detection-rules-cfg.json credentials file set."
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
python -m hunting run-query --file-path hunting/linux/queries/low_volume_external_network_connections_from_process.toml --all

echo "Viewing Hunt: 12526f14-5e35-4f5f-884c-96c6a353a544"
python -m hunting view-hunt --uuid 12526f14-5e35-4f5f-884c-96c6a353a544 --format json
Expand Down
2 changes: 1 addition & 1 deletion hunting/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def update_or_add_entry(self, hunt_config: Hunt, toml_path: Path) -> None:

entry = {
'name': hunt_config.name,
'path': f"./{toml_path.relative_to(self.base_path).as_posix()}",
'path': f"./{toml_path.resolve().relative_to(self.base_path).as_posix()}",
'mitre': hunt_config.mitre
}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "detection_rules"
version = "1.2.12"
version = "1.2.13"
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."
readme = "README.md"
requires-python = ">=3.12"
Expand Down
Loading