1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-05 05:12:05 -04:00

feat: Implement immutable DMS command policy

- Added pre-run checks for greeter and setup commands to enforce policy restrictions
- Created cli-policy.default.json to define blocked commands and user messages for immutable environments.
This commit is contained in:
purian23
2026-03-05 23:08:27 -05:00
committed by bbedward
parent c72c9bfb08
commit 7156e1e299
5 changed files with 306 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
package network
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
@@ -28,7 +29,13 @@ func TestDetectResult_HasNetworkdField(t *testing.T) {
func TestDetectNetworkStack_Integration(t *testing.T) {
result, err := DetectNetworkStack()
if err != nil && strings.Contains(err.Error(), "connect system bus") {
t.Skipf("system D-Bus unavailable: %v", err)
}
assert.NoError(t, err)
assert.NotNil(t, result)
assert.NotEmpty(t, result.ChosenReason)
if assert.NotNil(t, result) {
assert.NotEmpty(t, result.ChosenReason)
}
}