tamperward 2.27.0 → 2.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/cli/index.js +558 -278
- package/package.json +1 -1
- package/schemas/audit-v1.schema.json +100 -0
- package/schemas/stats-v1.schema.json +119 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamperward",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.0",
|
|
4
4
|
"description": "The deterministic agent-integrity gate. One ruleset, evaluated on the actual diff/commands as a verdict, enforced everywhere a change can be made.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "hexrift",
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/hexrift/tamperward/blob/main/schemas/audit-v1.schema.json",
|
|
4
|
+
"title": "TamperWard audit event v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"id",
|
|
10
|
+
"timestamp",
|
|
11
|
+
"surface",
|
|
12
|
+
"agent",
|
|
13
|
+
"rule",
|
|
14
|
+
"severity",
|
|
15
|
+
"decision"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schema_version": {
|
|
19
|
+
"const": 1
|
|
20
|
+
},
|
|
21
|
+
"id": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^sha256:[0-9a-f]{32}$"
|
|
24
|
+
},
|
|
25
|
+
"timestamp": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
|
|
28
|
+
},
|
|
29
|
+
"surface": {
|
|
30
|
+
"enum": [
|
|
31
|
+
"pretooluse",
|
|
32
|
+
"stop"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"agent": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
|
|
38
|
+
},
|
|
39
|
+
"rule": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,79}$"
|
|
42
|
+
},
|
|
43
|
+
"severity": {
|
|
44
|
+
"enum": [
|
|
45
|
+
"block",
|
|
46
|
+
"warn"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"decision": {
|
|
50
|
+
"enum": [
|
|
51
|
+
"deny",
|
|
52
|
+
"warn"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"session": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^sha256:[0-9a-f]{24}$"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"allOf": [
|
|
61
|
+
{
|
|
62
|
+
"if": {
|
|
63
|
+
"properties": {
|
|
64
|
+
"severity": {
|
|
65
|
+
"const": "block"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"severity"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"then": {
|
|
73
|
+
"properties": {
|
|
74
|
+
"decision": {
|
|
75
|
+
"const": "deny"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"if": {
|
|
82
|
+
"properties": {
|
|
83
|
+
"severity": {
|
|
84
|
+
"const": "warn"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": [
|
|
88
|
+
"severity"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"then": {
|
|
92
|
+
"properties": {
|
|
93
|
+
"decision": {
|
|
94
|
+
"const": "warn"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/hexrift/tamperward/blob/main/schemas/stats-v1.schema.json",
|
|
4
|
+
"title": "TamperWard audit stats v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"events",
|
|
10
|
+
"blocked",
|
|
11
|
+
"warnings",
|
|
12
|
+
"sessions",
|
|
13
|
+
"first_event",
|
|
14
|
+
"last_event",
|
|
15
|
+
"by_rule",
|
|
16
|
+
"by_surface",
|
|
17
|
+
"interpretation"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"schema_version": {
|
|
21
|
+
"const": 1
|
|
22
|
+
},
|
|
23
|
+
"events": {
|
|
24
|
+
"type": "integer",
|
|
25
|
+
"minimum": 0
|
|
26
|
+
},
|
|
27
|
+
"blocked": {
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"minimum": 0
|
|
30
|
+
},
|
|
31
|
+
"warnings": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"minimum": 0
|
|
34
|
+
},
|
|
35
|
+
"sessions": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 0
|
|
38
|
+
},
|
|
39
|
+
"first_event": {
|
|
40
|
+
"anyOf": [
|
|
41
|
+
{
|
|
42
|
+
"type": "null"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "string",
|
|
46
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"last_event": {
|
|
51
|
+
"anyOf": [
|
|
52
|
+
{
|
|
53
|
+
"type": "null"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"by_rule": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": [
|
|
67
|
+
"rule",
|
|
68
|
+
"events",
|
|
69
|
+
"blocked",
|
|
70
|
+
"warnings"
|
|
71
|
+
],
|
|
72
|
+
"properties": {
|
|
73
|
+
"rule": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,79}$"
|
|
76
|
+
},
|
|
77
|
+
"events": {
|
|
78
|
+
"type": "integer",
|
|
79
|
+
"minimum": 1
|
|
80
|
+
},
|
|
81
|
+
"blocked": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"minimum": 0
|
|
84
|
+
},
|
|
85
|
+
"warnings": {
|
|
86
|
+
"type": "integer",
|
|
87
|
+
"minimum": 0
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"by_surface": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": [
|
|
98
|
+
"surface",
|
|
99
|
+
"events"
|
|
100
|
+
],
|
|
101
|
+
"properties": {
|
|
102
|
+
"surface": {
|
|
103
|
+
"enum": [
|
|
104
|
+
"pretooluse",
|
|
105
|
+
"stop"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"events": {
|
|
109
|
+
"type": "integer",
|
|
110
|
+
"minimum": 1
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"interpretation": {
|
|
116
|
+
"const": "finding-is-not-proof-of-intent"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|