Ver código fonte

Add STIG tests to the security menu

Bob Mottram 8 anos atrás
pai
commit
1a1e8826a6
1 arquivos alterados com 32 adições e 24 exclusões
  1. 32
    24
      src/freedombone-sec

+ 32
- 24
src/freedombone-sec Ver arquivo

@@ -756,19 +756,20 @@ function menu_security_settings {
756 756
     trap "rm -f $data" 0 1 2 5 15
757 757
     dialog --backtitle $"Freedombone Control Panel" \
758 758
            --title $"Security Settings" \
759
-           --radiolist $"Choose an operation:" 19 76 19 \
760
-           1 $"Show ssh host public key" off \
761
-           2 $"Password storage" off \
762
-           3 $"Export passwords" off \
763
-           4 $"Regenerate ssh host keys" off \
764
-           5 $"Regenerate Diffie-Hellman keys" off \
765
-           6 $"Update cipersuite" off \
766
-           7 $"Create a new Let's Encrypt certificate" off \
767
-           8 $"Renew Let's Encrypt certificate" off \
768
-           9 $"Enable GPG based authentication (monkeysphere)" off \
769
-           10 $"Register a website with monkeysphere" off \
770
-           11 $"Allow ssh login with passwords" off \
771
-           12 $"Go Back/Exit" on 2> $data
759
+           --radiolist $"Choose an operation:" 20 76 20 \
760
+           1 $"Run STIG tests" off \
761
+           2 $"Show ssh host public key" off \
762
+           3 $"Password storage" off \
763
+           4 $"Export passwords" off \
764
+           5 $"Regenerate ssh host keys" off \
765
+           6 $"Regenerate Diffie-Hellman keys" off \
766
+           7 $"Update cipersuite" off \
767
+           8 $"Create a new Let's Encrypt certificate" off \
768
+           9 $"Renew Let's Encrypt certificate" off \
769
+           10 $"Enable GPG based authentication (monkeysphere)" off \
770
+           11 $"Register a website with monkeysphere" off \
771
+           12 $"Allow ssh login with passwords" off \
772
+           13 $"Go Back/Exit" on 2> $data
772 773
     sel=$?
773 774
     case $sel in
774 775
         1) exit 1;;
@@ -791,46 +792,53 @@ function menu_security_settings {
791 792
 
792 793
     case $(cat $data) in
793 794
         1)
795
+            clear
796
+            echo $'Running STIG tests...'
797
+            echo ''
798
+            ${PROJECT_NAME}-tests --stig showall
799
+            exit 0
800
+            ;;
801
+        2)
794 802
             dialog --title $"SSH host public keys" \
795 803
                    --msgbox "\n$(get_ssh_server_key)" 12 60
796 804
             exit 0
797 805
             ;;
798
-        2)
806
+        3)
799 807
             store_passwords
800 808
             exit 0
801 809
             ;;
802
-        3)
810
+        4)
803 811
             export_passwords
804 812
             exit 0
805 813
             ;;
806
-        4)
814
+        5)
807 815
             regenerate_ssh_host_keys
808 816
             ;;
809
-        5)
817
+        6)
810 818
             regenerate_dh_keys
811 819
             ;;
812
-        6)
820
+        7)
813 821
             interactive_setup
814 822
             update_ciphersuite
815 823
             ;;
816
-        7)
824
+        8)
817 825
             create_letsencrypt
818 826
             ;;
819
-        8)
827
+        9)
820 828
             renew_letsencrypt
821 829
             ;;
822
-        9)
830
+        10)
823 831
             enable_monkeysphere
824 832
             ;;
825
-        10)
833
+        11)
826 834
             register_website
827 835
             ;;
828
-        11)
836
+        12)
829 837
             allow_ssh_passwords
830 838
             change_ssh_settings
831 839
             exit 0
832 840
             ;;
833
-        12)
841
+        13)
834 842
             exit 0
835 843
             ;;
836 844
     esac