Comments (9)
Ah... I need to double check something with my colleages. I have a suspicion that may have been an oversight. I think the original intent was to return a non-zero exit code when there are any warnings if the -w flag is not provided.
At this point it might make more sense to add a strict flag though, to minimize impact to other parties.
from cccs-yara.
Hello @JohnConnorRF could you take a look at the "https://github.com/CybercentreCanada/CCCS-Yara/tree/feature_add_strict_option_to_cli" and let me know if that meets your needs? Currently if the -st flag is used, no errors are encountered and warnings are encountered the cli will return a non-zero exit code of 49.
from cccs-yara.
Hey sorry for the long delay. The holidays were crazy. That commit works perfectly for my team's workflow! Thank you so much.
from cccs-yara.
Thank you very much.
Just to make sure I am understanding, you would like the ability to make certain warning get treated as errors? Given that the warning you are mentioning catches a lot of other items do you only specifically want to treat hash1, hash2, etc as errors but allow say reference1, reference2, etc?
I can think of a couple of different ways to accomplish this, potentially. But it really depends on if I am understanding the comment correctly.
from cccs-yara.
I think the simplest idea in my mind is just a cli flag like -strict or something that causes warnings to be considered errors. So in my own validation workflows I can choose to have a stricter mode.
Kind of like the opposite of the current -w flag where warnings are ignored.
from cccs-yara.
I guess the important thing is when there are errors the validation process exits with an error code (https://github.com/CybercentreCanada/CCCS-Yara/blob/master/yara_validator_cli.py#L282), I want the cli flag to say if there are one or more rules with warnings exit(99) as well.
from cccs-yara.
Alright I request a code review to merge this into the master branch, have a great day.
from cccs-yara.
Alright I request a code review to merge this into the master branch, have a great day.
Please make a PR
from cccs-yara.
The feature has been merged. Have a great day!
from cccs-yara.
Related Issues (17)
- Validation Reject Valid Rules with Non-ASCII Characters HOT 2
- Rule Hashing Duplicates plyara Function HOT 2
- Sample rule is not CCCS valid HOT 2
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Bug: Invalid yara rules pass validation HOT 5
- Bug: Whitespace Formatting Loop HOT 3
- Issue with import modules HOT 2
- last_modified date being overwritten
- Recommended changes HOT 2
- Add Malware Behavior Catalog Codes
- Invalid field name "typelib" HOT 2
- Metadata Parsing Errors HOT 1
- Field has Invalid Value: TLP:AMBER+STRICT
- How to describe cases when a yara rule have multiple hashes HOT 2
- Add an option to ignore private rules ? HOT 2
- README Suggestions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cccs-yara.