File tree Expand file tree Collapse file tree 5 files changed +13
-20
lines changed
Expand file tree Collapse file tree 5 files changed +13
-20
lines changed Original file line number Diff line number Diff line change 77 branches : [ main ]
88
99env :
10- GO_VERSION : ' 1.22 '
10+ GO_VERSION : ' 1.24 '
1111 PYTHON_VERSION : ' 3.12'
1212
1313jobs :
Original file line number Diff line number Diff line change @@ -2,41 +2,36 @@ package keep
22
33default decision := " deny"
44
5- # High trust score - allow access
6- decision := " allow" {
5+ decision := " allow" if {
76 valid_user
87 input.device.trust_score > = 80
98}
109
11- # Medium trust score - require step-up authentication
12- decision := " step-up" {
10+ decision := " step-up" if {
1311 valid_user
1412 input.device.trust_score > = 50
1513 input.device.trust_score < 80
1614}
1715
18- # Low trust score - deny access
19- decision := " deny" {
16+ decision := " deny" if {
2017 input.device.trust_score < 50
2118}
2219
23- # Special case: unknown or unregistered devices
24- decision := " deny" {
20+ decision := " deny" if {
2521 valid_user
2622 input.device.posture == " unknown"
2723}
2824
29- decision := " deny" {
25+ decision := " deny" if {
3026 valid_user
3127 input.device.posture == " unregistered"
3228}
3329
34- # Backward compatibility
35- allow {
30+ allow if {
3631 decision == " allow"
3732}
3833
39- valid_user {
34+ valid_user if {
4035 input.user.email != " "
4136 input.user.email != null
4237}
Original file line number Diff line number Diff line change 11package keep_test
22
3- import future.keywords
4-
5- test_allow_healthy_device {
3+ test_allow_healthy_device if {
64 input := {
75 " user" : {" email" : " alice@example.com" },
86 " device" : {" posture" : " healthy" },
@@ -12,7 +10,7 @@ test_allow_healthy_device {
1210 result == " allow"
1311}
1412
15- test_step_up_quarantined {
13+ test_step_up_quarantined if {
1614 input := {
1715 " user" : {" email" : " alice@example.com" },
1816 " device" : {" posture" : " quarantined" },
@@ -21,7 +19,7 @@ test_step_up_quarantined {
2119 result == " step-up"
2220}
2321
24- test_deny_missing_user {
22+ test_deny_missing_user if {
2523 input := {
2624 " user" : {" email" : " " },
2725 " device" : {" posture" : " healthy" },
Original file line number Diff line number Diff line change 1- FROM golang:1.22 AS build
1+ FROM golang:1.24 AS build
22
33WORKDIR /src
44COPY go.mod go.sum ./
Original file line number Diff line number Diff line change 1- FROM golang:1.22 AS build
1+ FROM golang:1.24 AS build
22
33WORKDIR /src
44COPY go.mod go.sum ./
You can’t perform that action at this time.
0 commit comments