-
Notifications
You must be signed in to change notification settings - Fork 297
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
Harmonization fixes #634
Harmonization fixes #634
Conversation
looks ok, thx!! |
Before merging, we should announce it on intelmq-dev, there are some important changes included. |
The tests fail because of issues on travis-ci's side, I hope they get fixed soon (as last time when the same issue appeared) |
|
What's the reasoning behind adding the "IF NOT EXISTS" to the "CREATE |
The new type and regex for event_hash seem wrong. The values are supposed to be SHA1 hashes, presumably represented as a hexadecimal string. This would fit the new length of 40 characters, but the regular expression allows much more than than only hexadecimal characters. In fact, the regex is identical to the one used for e.g. "malware.hash.md5", but that field does not have a length limit. The easiest solution would be to change the regex on event_hash to allow only hexadecimal digits, or to use the same type definition (length, regex and type) for all fields containing cryptographic hashes of some form. |
The problem with all the hashes is that we until recently never validated and normalized them, while they can have many different representations.
and then we can prefix all this with The first step in normalization was the attempt in #298 then we introduced different fields for md5 and sha1 as a hotfix 1d7a67b#diff-c8f7b29d126db063cf2e7268d2c9c5d6R152 @Rafiot Could you please review if the rules for misp-related fields are correct? @certtools/intelmq-contributors please review and give feedback |
My concern about the regex for |
On the whole, apart from the relatively minor points I brought up in other comments, this change should be OK for us. The important considerations are:
|
@sebix: the MISP related changes are good for me. |
I just re-ran the tests on travis, it still fails, but this time for a good reason :) |
@Rafiot This is again travis' fault, it's fixed in the PR |
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
registry is an enum nowm, uppercase only country codes are 2 chars, uppercase Hashes are case-sensitive! New harmonization-type UppercaseString Signed-off-by: Sebastian Wagner <[email protected]>
fixes #629 Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Current coverage is 72.27% (diff: 88.46%)@@ master #634 diff @@
==========================================
Files 199 201 +2
Lines 7339 7463 +124
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 5228 5394 +166
+ Misses 2111 2069 -42
Partials 0 0
|
@sebix everything cool from my side |
Signed-off-by: Sebastian Wagner <[email protected]>
Concerning the hashes: I think we need to postpone this topic entirely, there are multiple things to fix. E.g. we need a list of hashes and normalization. Both are non-trivial. E.g. we could partially use passlib's identify function For now I propose we loosen the constraints and checks, to not pose any additional burden to users:
It's raising now.
The only missing restriction are the min/max afaict. As we already defined them as float, the only valid format is the Signed degrees format, as opposed to compass direction formats. Possible value restrictions:
We tried to create a script which updates the table definition otherwise, but that's not possible anyway. Removed. |
Signed-off-by: Sebastian Wagner <[email protected]>
|
|
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
Signed-off-by: Sebastian Wagner <[email protected]>
I reviewed @bernhard-herzog and all your comments. We also let this PR rest a bit so that enough people can comment. Thanks everyone! |
intelmq_psql_initdb.py
is adapted/fixed and tests for this file are added.ping @bernhard-herzog