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
William Ballenthin
dfaa907319
scripts: migrate rules: better variable names
2020-06-22 07:00:23 -06:00
William Ballenthin
ffd926c84c
scripts: migrate-rules: detect rules that aren't in the migration plan
2020-06-22 06:59:10 -06:00
William Ballenthin
5eddc9d3f4
scripts: migrate-rules: parse ATT&CK from tag name
2020-06-21 17:59:16 -06:00
William Ballenthin
c06a1dae8a
scripts: migrate-rules: migrates rules pretty well
2020-06-21 17:40:16 -06:00
William Ballenthin
7a81b739ea
Merge branch 'master' into rule-organization
2020-06-21 16:48:33 -06:00
William Ballenthin
b3ca9f0daf
rule: fmt: add trailing newline to capa files
2020-06-21 15:51:11 -06:00
Willi Ballenthin
c8bcc154c5
Merge branch 'master' into capafmt
2020-06-25 07:47:25 -06:00
Willi Ballenthin
fb6d8354bd
Merge pull request #11 from fireeye/mr-tz-update-setup-hooks
...
Update setup-hooks.sh
2020-06-24 08:17:02 -06:00
Moritz Raabe
beba3fb3c7
double to single quotes
2020-06-24 15:00:35 +02:00
Moritz
95b3b129ec
Update setup-hooks.sh
2020-06-24 14:29:50 +02:00
Ana María Martínez Gómez
96ad823e35
Add hooks for running linters and tests
...
Add the `scripts/setup-hooks.sh` script which sets the following hooks
up:
- The `post-commit` hook runs the linter after every `git commit`,
letting you know if there are code style or rule linter offenses you
need to fix.
- The `pre-push` hook runs the linter and the tests and block the `git
push` if they do not succeed.
This way you realise if everything is alright without the need of
sending a PR.
2020-06-22 11:35:45 +02:00
William Ballenthin
56536792f8
capafmt: initial impl
2020-06-21 11:37:33 -06:00
William Ballenthin
c4833fb731
scripts: add migrate-rules snapshot
2020-06-20 09:13:23 -06:00
William Ballenthin
add3537447
import source files, forgetting about 938 prior commits
2020-06-18 09:13:19 -06:00