Commit Graph

64 Commits

Author SHA1 Message Date
William Ballenthin
dc6b61adf3 lint: fix recommendations via templating
closes #189
2020-07-23 11:53:56 -06:00
William Ballenthin
3f55864ce0 lint: ignore period in rule name
closes #190
2020-07-23 11:42:07 -06:00
William Ballenthin
baeea5b6ec *: update license header to reference Apache 2.0
closes #173
2020-07-22 15:05:24 -06:00
Ana María Martínez Gómez
ab1dc3b804 Fix rule linter
Prevent the linter to raise an exception if `examples` is `None`, as it
for example currently happens in:
`capa-rules/nursery/hash-data-using-murmur2.yml`

We could also remove the `examples` tag in those cases, but the linter
shouldn't break in any case.
2020-07-17 14:01:07 +02:00
Ana María Martínez Gómez
07764fb31f Use isort 5
Run `isort --profile black --length-sort --line-width 120 .`

Update documentation as well.
2020-07-16 22:02:53 +02:00
William Ballenthin
3faf175da7 *: add license header
closes #144
2020-07-15 14:14:53 -06:00
Willi Ballenthin
54cd456174 Merge pull request #143 from fireeye/remove-scripts-testbed
remove testbed scripts
2020-07-14 15:08:32 -06:00
Moritz Raabe
96feab7b4d remove testbed scripts 2020-07-14 23:06:32 +02:00
William Ballenthin
028b0c3734 pep8 2020-07-14 08:42:54 -06:00
Moritz Raabe
22c3475714 main: output updates 2020-07-09 22:42:34 +02:00
Willi Ballenthin
2c69f275a9 Merge pull request #124 from fireeye/ida-import
add import to IDA script
2020-07-07 19:59:17 -06:00
Moritz
8c7ed4f50c Merge pull request #126 from fireeye/fix-testbed
Fix testbed
2020-07-07 23:18:49 +02:00
William Ballenthin
e0ad071dd4 testbed: fix imports now that its standalone scripts
closes #125
2020-07-07 13:39:50 -06:00
William Ballenthin
780b145b59 pep8 2020-07-07 13:39:15 -06:00
William Ballenthin
4fa5bf1d93 pep8 2020-07-07 13:16:25 -06:00
William Ballenthin
a9b447dcbe add script import-to-ida.py
closes #120
2020-07-07 13:16:08 -06:00
William Ballenthin
56b9462d01 git hooks: fix references to tox config 2020-07-07 12:30:54 -06:00
William Ballenthin
091f1d0c41 render: show rules path
closes #111
2020-07-06 17:08:55 -06:00
William Ballenthin
ecba9986fc pep8 2020-07-06 14:07:02 -06:00
William Ballenthin
484179c042 render: move capabilities by function to its own standalone script 2020-07-06 14:06:06 -06:00
William Ballenthin
845938d4e6 scripts: show-features: add doc 2020-07-06 13:48:30 -06:00
William Ballenthin
9fe70dd19c Merge branch 'master' into output-feature-count 2020-07-03 20:49:39 -06:00
Moritz Raabe
9e0d2ffd7b account for Windows paths 2020-07-06 13:00:28 +02:00
William Ballenthin
867de57062 main: find_capabilities: extract feature counts per item, too
closes #95
closes #96
2020-07-03 10:12:03 -06:00
William Ballenthin
612eefe2e8 dos2unix 2020-07-02 11:08:21 -06:00
William Ballenthin
1188103d1c pep8: isort 2020-07-02 10:52:05 -06:00
William Ballenthin
c185e9ef09 pep8: black 2020-07-02 10:32:26 -06:00
William Ballenthin
db2b1caeae Merge branch 'master' into fmt-black 2020-07-02 10:25:24 -06:00
Ana María Martínez Gómez
a80f38ec75 Fix get_features rule linter
To support matching namespaces `get_features()` get an extra parameters
which was missing in the rule linter.
2020-07-02 09:24:51 +02:00
William Ballenthin
23e70b4e85 pep8: scripts 2020-07-01 12:42:33 -06:00
Ana María Martínez Gómez
24792cd160 Fix unrestored stashed changes in post-commit hook
If the style checker of the rule linter failed, the stashed changes were
not restored. There is no reason to exist with an error code in a post
hook. In pre hooks this causes the action to be aborted.
2020-07-01 13:59:06 +02:00
Moritz Raabe
cd77aa23db Merge branch 'master' into linter-lib-checks 2020-07-01 09:27:56 +02:00
Moritz Raabe
5cee0d9b80 add lint negative numbers and cleanup tests 2020-06-30 22:17:42 +02:00
William Ballenthin
325aa9574f linter: check that lib rules don't have a namespace
closes #35
2020-06-29 06:16:19 -06:00
William Ballenthin
7a5d2d025f linter: check that lib rules are in lib directory
closes #36
2020-06-29 06:09:18 -06:00
William Ballenthin
9d297e6699 linter: ignore testbed files 2020-06-29 06:09:02 -06:00
William Ballenthin
e3245385c1 linter: use posixpath to normalize slashes 2020-06-28 08:52:30 -06:00
William Ballenthin
21e3b75a3a linter: show expected/found filenames 2020-06-28 08:41:31 -06:00
William Ballenthin
918a47cfb7 git hooks: address shellcheck issues 2020-06-26 19:04:36 -06:00
William Ballenthin
d1dd997b7b setup: add dev dependencies
closes #21
2020-06-26 18:59:23 -06:00
William Ballenthin
26fef7c615 *: formatting 2020-06-26 18:44:19 -06:00
William Ballenthin
f82e453440 linter: learn to check for unusual meta fields
closes #24
2020-06-26 18:32:17 -06:00
William Ballenthin
8ab91269fa linter: learn to check namespace matches rule path
closes #6
2020-06-26 18:23:47 -06:00
William Ballenthin
22537eb936 linter: learn to check filename to match rule name
closes #7
2020-06-26 18:16:20 -06:00
William Ballenthin
5de0884dd2 main: learn to save off the path to each rule 2020-06-26 18:09:51 -06:00
William Ballenthin
d32c20d140 linter: check for namespace instead of rule-category 2020-06-26 17:53:37 -06:00
William Ballenthin
35faa20e9e linter: check for namespace instead of rule-category 2020-06-26 17:52:32 -06:00
William Ballenthin
3e973b4307 scripts: migrate-rules: fixup matches references 2020-06-26 17:43:31 -06:00
William Ballenthin
be1a7a06e1 scripts: migrate-rule: respect lib meta 2020-06-25 17:29:08 -06:00
William Ballenthin
45dea2b8aa scripts: migrate rules: respect nursery status 2020-06-22 07:40:55 -06:00