Skip to content

Commit 492a815

Browse files
committed
security: find kconfig binary
1 parent 179cb1e commit 492a815

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hooks/security.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
class SecurityHook(Hook):
1212

1313
CHECKSEC_BIN = Path(__file__).parent.parent/"tools"/"checksec"/"checksec"
14+
KCONFIG_BIN = Path(__file__).parent.parent/"tools"/"kconfig-hardened-check"/"kconfig-hardened-check.py"
1415

1516
def __init__(self, parameters):
1617
super().__init__(parameters)
@@ -19,6 +20,10 @@ def __init__(self, parameters):
1920
raise RuntimeError('Cannot find checksec, did you forget to init the submodule ?')
2021
self.checksec = str(self.CHECKSEC_BIN)
2122

23+
if not self.KCONFIG_BIN.exists():
24+
raise RuntimeError('Cannot find kconfig-hardened-check, did you forget to init the submodule ?')
25+
self.kconfig = str(self.KCONFIG_BIN)
26+
2227
self.context.subscribe('filesystem_new_file_mime', self.check_file)
2328

2429
def check_file(self, event):

0 commit comments

Comments
 (0)