Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kernel-hardening-checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
kernel-hardening-checker
Commits
100a39e2
Commit
100a39e2
authored
Apr 06, 2020
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve versioning
parent
75bed5d6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
7 deletions
+16
-7
README.md
README.md
+3
-4
__about__.py
kconfig_hardened_check/__about__.py
+1
-0
__init__.py
kconfig_hardened_check/__init__.py
+4
-1
setup.cfg
setup.cfg
+0
-1
setup.py
setup.py
+8
-1
No files found.
README.md
View file @
100a39e2
...
...
@@ -44,7 +44,7 @@ or simply run `./bin/kconfig-hardened-check` from the cloned repository.
## Usage
```
usage: kconfig-hardened-check [-h] [-p {X86_64,X86_32,ARM64,ARM}] [-c CONFIG]
[--debug] [--json]
[--debug] [--json]
[--version]
Checks the hardening options in the Linux kernel config
...
...
@@ -56,6 +56,7 @@ optional arguments:
check the config_file against these preferences
--debug enable verbose debug mode
--json print results in JSON format
--version show program's version number and exit
```
## Output for `Ubuntu 18.04 (Bionic Beaver with HWE)` kernel config
...
...
@@ -215,9 +216,7 @@ I usually update the kernel hardening recommendations after each Linux kernel re
So the version of
`kconfig-hardened-check`
is associated with the corresponding version of the kernel.
The version format is: __
[
major_number
]
.
[
kernel_version
]
__
The current version of
`kconfig-hardened-check`
is __0.5.5__, it's marked with the git tag.
The version format is: __
[
major_number
]
.
[
kernel_version
]
.
[
kernel_patchlevel
]
__
## Questions and answers
...
...
kconfig_hardened_check/__about__.py
0 → 100755
View file @
100a39e2
__version__
=
'0.5.5'
kconfig_hardened_check/__init__.py
View file @
100a39e2
...
...
@@ -59,6 +59,7 @@ from argparse import ArgumentParser
from
collections
import
OrderedDict
import
re
import
json
from
.__about__
import
__version__
# debug_mode enables:
# - reporting about unknown kernel options in the config,
...
...
@@ -603,7 +604,8 @@ def main():
config_checklist
=
[]
parser
=
ArgumentParser
(
description
=
'Checks the hardening options in the Linux kernel config'
)
parser
=
ArgumentParser
(
prog
=
'kconfig-hardened-check'
,
description
=
'Checks the hardening options in the Linux kernel config'
)
parser
.
add_argument
(
'-p'
,
'--print'
,
choices
=
supported_archs
,
help
=
'print hardening preferences for selected architecture'
)
parser
.
add_argument
(
'-c'
,
'--config'
,
...
...
@@ -612,6 +614,7 @@ def main():
help
=
'enable verbose debug mode'
)
parser
.
add_argument
(
'--json'
,
action
=
'store_true'
,
help
=
'print results in JSON format'
)
parser
.
add_argument
(
'--version'
,
action
=
'version'
,
version
=
'
%(prog)
s '
+
__version__
)
args
=
parser
.
parse_args
()
if
args
.
debug
:
...
...
setup.cfg
View file @
100a39e2
[metadata]
name = kconfig-hardened-check
version = 0.5.5
author = Alexander Popov
author_email = alex.popov@linux.com
home-page = https://github.com/a13xp0p0v/kconfig-hardened-check
...
...
setup.py
View file @
100a39e2
...
...
@@ -2,4 +2,11 @@
from
setuptools
import
setup
setup
()
about
=
{}
with
open
(
"kconfig_hardened_check/__about__.py"
)
as
f
:
exec
(
f
.
read
(),
about
)
print
(
'v: "{}"'
.
format
(
about
[
'__version__'
]))
# See the options in setup.cfg
setup
(
version
=
about
[
'__version__'
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment