Git Product home page Git Product logo

Comments (9)

cccs-gm avatar cccs-gm commented on August 25, 2024 1

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.

cccs-gm avatar cccs-gm commented on August 25, 2024 1

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.

JohnConnorRF avatar JohnConnorRF commented on August 25, 2024 1

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.

cccs-gm avatar cccs-gm commented on August 25, 2024

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.

JohnConnorRF avatar JohnConnorRF commented on August 25, 2024

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.

JohnConnorRF avatar JohnConnorRF commented on August 25, 2024

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.

cccs-gm avatar cccs-gm commented on August 25, 2024

Alright I request a code review to merge this into the master branch, have a great day.

from cccs-yara.

cccs-jp avatar cccs-jp commented on August 25, 2024

Alright I request a code review to merge this into the master branch, have a great day.

Please make a PR

from cccs-yara.

cccs-gm avatar cccs-gm commented on August 25, 2024

The feature has been merged. Have a great day!

from cccs-yara.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.