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

Create static HTML pages for the YML rules #178

Open
YamatoSecurity opened this issue Aug 30, 2024 · 6 comments
Open

Create static HTML pages for the YML rules #178

YamatoSecurity opened this issue Aug 30, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@YamatoSecurity
Copy link
Collaborator

Depending on the browser, some browsers will only let you download the YML file when clicking the link which is not convenient for looking up rules. @nishikawaakira What about creating colored syntax highlighted HTML pages based on the YML files when running the html-report command and then open up that HTML when someone clicks on a rule link?

@YamatoSecurity YamatoSecurity added the enhancement New feature or request label Aug 30, 2024
@YamatoSecurity YamatoSecurity added this to the v2.7.0 SecTor release milestone Aug 30, 2024
@nishikawaakira
Copy link
Collaborator

It seems like a lot of work to implement, but if it makes it easier to understand the cause of the detection, I think it is a good idea. I don't understand the structure of YML, so I would like to know what to color and how to color it 🙏

@YamatoSecurity
Copy link
Collaborator Author

yamlhightlight

I like this way. Any field name with field: format is blue. Field values are the regular color (black or white), or could do orange like in the example.

Comments (# this is a comment) should be green.

Optionally we could make numerals (1232, etc.. ) and true/false values a different color but I don't think this is necessary.

@nishikawaakira
Copy link
Collaborator

@YamatoSecurity
Is it like this?
スクリーンショット 2024-09-10 15 34 50

@YamatoSecurity
Copy link
Collaborator Author

@nishikawaakira That looks great. The example doesn't have a comment in there but if the # This is a comment lines are green (like the description in the example), then that is ok.

@nishikawaakira
Copy link
Collaborator

@YamatoSecurity
I've been trying various things, but when fields in the rule file are added or changed, it causes a mismatch with the structure definition, and Nim's YAML library throws an exception and crashes. Is this an issue? I'd like to consider whether it's better to leave it as it is or proceed with this approach.

@YamatoSecurity
Copy link
Collaborator Author

@nishikawaakira I see, if it is difficult to add color then it is ok to skip for now.

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

No branches or pull requests

2 participants