Skip to content
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

Update poetry to 0.7.11 #39

Merged
merged 2 commits into from
Dec 9, 2023
Merged
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
1,180 changes: 588 additions & 592 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sigma-cli"
version = "0.7.10"
version = "0.7.11"
description = "Sigma Command Line Interface (conversion, check etc.) based on pySigma"
authors = ["Thomas Patzke <[email protected]>"]
license = "LGPL-2.1-or-later"
Expand Down
1 change: 0 additions & 1 deletion sigma/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
pass

import importlib.metadata as metadata
import click
from .list import list_group
from .convert import convert
from .check import check
Expand Down
2 changes: 2 additions & 0 deletions tests/files/valid/sigma_rule.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
title: Test rule
id: 5013332f-8a70-4e04-bcc1-06a98a2cca2e
description: it is a valid rule
status: stable
level: high
date: 2023-12-09
logsource:
category: process_creation
product: windows
Expand Down
13 changes: 7 additions & 6 deletions tests/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def test_check_valid():

def test_check_stdin():
cli = CliRunner()
input = open("tests/files/valid/sigma_rule.yml", "rt").read()
with open("tests/files/valid/sigma_rule.yml", "rt") as yml_file:
input = yml_file.read()
result = cli.invoke(check, ["-"], input=input)
assert result.exit_code == 0
assert "0 errors" in result.stdout
Expand All @@ -41,8 +42,8 @@ def test_check_invalid():
def test_check_with_issues():
cli = CliRunner()
result = cli.invoke(check, ["tests/files/issues"])
assert result.exit_code == 0
assert "11 issues" in result.stdout
assert result.exit_code == 1
assert "12 issues" in result.stdout


def test_check_with_issues_exclusions():
Expand All @@ -55,8 +56,8 @@ def test_check_with_issues_exclusions():
"tests/files/issues",
],
)
assert result.exit_code == 0
assert "9 issues" in result.stdout
assert result.exit_code == 1
assert "10 issues" in result.stdout


def test_check_fail_on_issues():
Expand All @@ -83,7 +84,7 @@ def test_check_exclude():
"tests/files/issues/sigma_rule_with_bad_references.yml",
],
)
assert result.exit_code == 0
assert result.exit_code == 1
assert "Invalid validators name" in result.stdout
assert "myvalidator" in result.stdout
assert "Ignoring these validators" in result.stdout
3 changes: 2 additions & 1 deletion tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def test_convert_output_list_of_str():

def test_convert_stdin():
cli = CliRunner()
input = open("tests/files/valid/sigma_rule.yml", "rt").read()
with open("tests/files/valid/sigma_rule.yml", "rt") as yml_file:
input = yml_file.read()
result = cli.invoke(
convert,
[
Expand Down