7 - echo "Prepare for the installation..."
12 - echo "Install the package via pip..."
13 - pip --verbose install --no-cache-dir git+https://github.com/a13xp0p0v/kernel-hardening-checker
14 - echo "Run the installed tool..."
15 - which kernel-hardening-checker
16 - kernel-hardening-checker
17 - echo "Check all configs with the installed tool..."
18 - sysctl -a > /tmp/sysctls
19 - CONFIG_DIR=`find /usr/local/lib/ -name config_files`
20 - KCONFIGS=`find $CONFIG_DIR -type f | grep -e "\.config" -e "\.gz"`
22 - for C in $KCONFIGS; do COUNT=$(expr $COUNT + 1); echo ">>>>> checking kconfig number $COUNT <<<<<"; kernel-hardening-checker -c $C -l /proc/cmdline -s /tmp/sysctls; done
23 - echo "Have checked $COUNT kconfigs"
24 static-typing-checking:
28 - echo "Install the mypy tool..."
30 - pip install --no-cache-dir mypy
31 - mypy kernel_hardening_checker/ --show-error-context --pretty --no-incremental --check-untyped-defs --disallow-untyped-defs --strict-equality
36 - echo "Install the pylint tool..."
38 - pip install --no-cache-dir pylint
39 - pip install --no-cache-dir setuptools
40 - pylint --recursive=y kernel_hardening_checker setup.py
41 functional-test-with-coverage:
45 - echo "Install the coverage tool..."
47 - pip install --no-cache-dir coverage
48 - echo "Run the functional tests and collect the coverage..."
49 - sh .github/workflows/functional_test.sh
50 - echo "Show the coverage report..."