Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pysigma,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "pysigma-backend-insightidr";
12 version = "0.2.4";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "SigmaHQ";
17 repo = "pySigma-backend-insightidr";
18 tag = "v${version}";
19 hash = "sha256-dc25zDYQeU9W9qwrRz7zsM2wOl8kMapDvwFhB6VOwhY=";
20 };
21
22 build-system = [ poetry-core ];
23
24 dependencies = [ pysigma ];
25
26 pythonRelaxDeps = [ "pysigma" ];
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 pythonImportsCheck = [
31 "sigma.backends.insight_idr"
32 "sigma.pipelines.insight_idr"
33 ];
34
35 disabledTests = [
36 # Tests are outdated
37 "est_insight_idr_pipeline_dns_field_mapping"
38 "test_insight_idr_base64_query"
39 "test_insight_idr_cidr_query"
40 "test_insight_idr_condition_nested_logic"
41 "test_insight_idr_contains_all_query"
42 "test_insight_idr_contains_any_query"
43 "test_insight_idr_endswith_any_query"
44 "test_insight_idr_keyword_and_query"
45 "test_insight_idr_keyword_or_query"
46 "test_insight_idr_leql_advanced_search_output_format"
47 "test_insight_idr_leql_detection_definition_output_format"
48 "test_insight_idr_multi_selection_same_field"
49 "test_insight_idr_not_1_of_filter_condition"
50 "test_insight_idr_not_condition_query"
51 "test_insight_idr_pipeline_process_creation_field_mapping"
52 "test_insight_idr_pipeline_simple"
53 "test_insight_idr_pipeline_unsupported_aggregate_conditions_rule_type"
54 "test_insight_idr_pipeline_web_proxy_field_mapping"
55 "test_insight_idr_re_query"
56 "test_insight_idr_simple_contains_query"
57 "test_insight_idr_simple_endswith_query"
58 "test_insight_idr_simple_eq_nocase_query"
59 "test_insight_idr_simple_startswith_query"
60 "test_insight_idr_single_quote"
61 "test_insight_idr_startswith_any_query"
62 "test_insight_idr_triple_quote"
63 "test_insight_idr_value_eq_and_query"
64 "test_insight_idr_value_eq_or_query"
65 "test_insight_idr_value_in_list_query"
66 ];
67
68 meta = {
69 description = "Library to support the Rapid7 InsightIDR backend for pySigma";
70 homepage = "https://github.com/SigmaHQ/pySigma-backend-insightidr";
71 changelog = "https://github.com/SigmaHQ/pySigma-backend-insightidr/releases/tag/${src.tag}";
72 license = lib.licenses.lgpl21Only;
73 maintainers = with lib.maintainers; [ fab ];
74 };
75}