diff --git a/.github/workflows/test-linux-commands.yaml b/.github/workflows/test-linux-commands.yaml index 46ff7cf..ac73658 100644 --- a/.github/workflows/test-linux-commands.yaml +++ b/.github/workflows/test-linux-commands.yaml @@ -13,4 +13,5 @@ jobs: - name: Configure USBGuard run: | pip install -r requirements.txt + python3 BackEnd/readtoml.py diff --git a/config/sampleconfig.toml b/config/sampleconfig.toml index 607ed2d..19ac986 100644 --- a/config/sampleconfig.toml +++ b/config/sampleconfig.toml @@ -1 +1,8 @@ -enable = false \ No newline at end of file +[physical-ports] +enable = true +allow-all = false +rules = [ + {allow = true, id = "1a2c:4c5e", name = "USB Keyboard", port = "1-2"}, # allow only at that port + {allow = true, id = "04f3:0c00", name = "ELAN:ARM-M4"}, + {allow = false, port = "1-3"} # block all devices at that port +] \ No newline at end of file diff --git a/tests/test_config.py b/tests/test_config.py index e9aca01..c88a4bc 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -18,6 +18,7 @@ def test_configuration_file_exists(self): self.assertTrue(os.path.exists(self.config_file), "Configuration file not found.") def test_disable_usbguard_if_not_enabled(self): + pass def test_generate_rules_conf_allow_all(self):