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

Reload rules while profiling #990

Merged
merged 8 commits into from Jan 10, 2024
Merged

Conversation

jw3
Copy link
Member

@jw3 jw3 commented Jan 10, 2024

Allow rules to be loaded dynamically into a profiling session.

This allows for a better test / update cycle while profiling as the profiler does not have to be shutdown to update rules.

This also adds a new concept, the "Rule Identity", which provides a sha256 hash of the rule database to allow change monitoring across both profiler and systemd daemon execution. This hash is based on the compiled rules to provide a precise content based hash.

Closes #985
Closes #989

@jw3 jw3 added this to the v1.3 milestone Jan 10, 2024
@@ -197,7 +197,7 @@ def __pack_main_content(self, page: UIPage):
page.dispose()
return

if self.__page:
if self.__page is not None:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cause of split view when navigating away from rule view after Events was mixed in.

The type after Event mixin must not have had a bool ability. It also didnt have a string rep, perhaps that was one in the same with the bool rep.

Checking for not None here is appropriate regardless, since there is not a valid bool rep of a page.

@jw3 jw3 merged commit 5004d49 into ctc-oss:master Jan 10, 2024
18 of 21 checks passed
@jw3 jw3 deleted the 989-reload_rules_in_profiler branch January 10, 2024 21:20
jw3 added a commit to jw3/fapolicy-analyzer that referenced this pull request Jan 22, 2024
Allow rules to be loaded dynamically into a profiling session.

This allows for a better test / update cycle while profiling as the
profiler does not have to be shutdown to update rules.

This also adds a new concept, the "Rule Identity", which provides a
sha256 hash of the rule database to allow change monitoring across both
profiler and systemd daemon execution. This hash is based on the
compiled rules to provide a precise content based hash.

Closes ctc-oss#985
Closes ctc-oss#989
# Conflicts:
#	crates/pyo3/Cargo.toml
@jw3 jw3 mentioned this pull request Jan 22, 2024
jw3 added a commit that referenced this pull request Jan 22, 2024
Updates el8 for 1.3.0

- Use digest crate #984
- Reload rules while profiling #990
- Add lang for config #991

Adds a draft release check to guard artifact publishing.
- Closes #976
@jw3 jw3 mentioned this pull request Feb 11, 2024
jw3 added a commit that referenced this pull request Feb 11, 2024
##
[v1.3.0](https://github.com/ctc-oss/fapolicy-analyzer/releases/tag/v1.3.0)
- 2024-02-11


### Added

- Allow rules to be loaded dynamically into a profiling session
([#990](#990))
- Added syntax highlighting to the fapolicyd config editor
([#991](#991))

### Packaging

- Use digest crate for sha256 hashing, removing need for ring crate.
([#984](#984))
- Add a version number to the PDF user guide content and filename.
([#995](#995))
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

Successfully merging this pull request may close these issues.

Reload rules in live profiler Hash rules db
1 participant