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

Traceback when analysing OVAL from shared/checks/oval directory #27

Open
ggbecker opened this issue Jan 5, 2022 · 1 comment
Open

Comments

@ggbecker
Copy link
Member

ggbecker commented Jan 5, 2022

python3 ./ctf/content_test_filtering.py pr --verbose --rule --output json 7635

DEBUG   OVALAnalysis           - Analyzing OVAL file /shared/checks/oval/var_firewall_package_is_nftables.xml
DEBUG   OVALAnalysis           - Rule name: var_firewall_package_is_nftables
DEBUG   DiffStruct             - rule.yml was not found for var_firewall_package_is_nftables
Traceback (most recent call last):
  File "/__w/content/content/./ctf/content_test_filtering.py", line 44, in <module>
    diff_structure = diff_analysis.analyse_file(file_record)
  File "/__w/content/content/ctf/ctf/diff_analysis.py", line 54, in analyse_file
    return file_analyzer.process_analysis()
  File "/__w/content/content/ctf/ctf/analysis/OVALAnalysis.py", line 235, in process_analysis
    self.diff_struct.add_changed_product_by_rule(self.rule_name, msg=msg)
  File "/__w/content/content/ctf/ctf/DiffStruct.py", line 122, in add_changed_product_by_rule
    product_name = self.get_rule_products(rule_name)
  File "/__w/content/content/ctf/ctf/DiffStruct.py", line 89, in get_rule_products
    with open(ruleyml_path) as f:
TypeError: expected str, bytes or os.PathLike object, not NoneType
@matejak
Copy link
Member

matejak commented Jul 22, 2022

+1, it looks like that the tool tries to find a matching rule to use it in testing, but as there is not any, it gets into a dead end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants