Skip to content

Commit e347b96

Browse files
author
root
committed
fix test backend
1 parent 67be486 commit e347b96

20 files changed

Lines changed: 539 additions & 192 deletions

File tree

Makefile

Lines changed: 282 additions & 75 deletions
Large diffs are not rendered by default.
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
[
2+
{
3+
"RuleID": "private-key",
4+
"Description": "Identified a Private Key, which may compromise cryptographic security and sensitive data encryption.",
5+
"StartLine": 72,
6+
"EndLine": 86,
7+
"StartColumn": 77,
8+
"EndColumn": 110,
9+
"Match": "REDACTED",
10+
"Secret": "REDACTED",
11+
"File": "domain/certs/resolve_test.go",
12+
"SymlinkFile": "",
13+
"Commit": "",
14+
"Entropy": 5.166665,
15+
"Author": "",
16+
"Email": "",
17+
"Date": "",
18+
"Message": "",
19+
"Tags": [],
20+
"Fingerprint": "domain/certs/resolve_test.go:private-key:72"
21+
},
22+
{
23+
"RuleID": "generic-api-key",
24+
"Description": "Detected a Generic API Key, potentially exposing access to various services and sensitive operations.",
25+
"StartLine": 218,
26+
"EndLine": 218,
27+
"StartColumn": 12,
28+
"EndColumn": 79,
29+
"Match": "secrets.EnvSecretKey, \"REDACTED\"",
30+
"Secret": "REDACTED",
31+
"File": "domain/monitor/signals/agent/agent_test.go",
32+
"SymlinkFile": "",
33+
"Commit": "",
34+
"Entropy": 4.6523914,
35+
"Author": "",
36+
"Email": "",
37+
"Date": "",
38+
"Message": "",
39+
"Tags": [],
40+
"Fingerprint": "domain/monitor/signals/agent/agent_test.go:generic-api-key:218"
41+
},
42+
{
43+
"RuleID": "generic-api-key",
44+
"Description": "Detected a Generic API Key, potentially exposing access to various services and sensitive operations.",
45+
"StartLine": 218,
46+
"EndLine": 218,
47+
"StartColumn": 12,
48+
"EndColumn": 79,
49+
"Match": "secrets.EnvSecretKey, \"REDACTED\"",
50+
"Secret": "REDACTED",
51+
"File": "domain/monitor/signals/agent/agent_test.go",
52+
"SymlinkFile": "",
53+
"Commit": "",
54+
"Entropy": 4,
55+
"Author": "",
56+
"Email": "",
57+
"Date": "",
58+
"Message": "",
59+
"Tags": [
60+
"decoded:base64",
61+
"decode-depth:1"
62+
],
63+
"Fingerprint": "domain/monitor/signals/agent/agent_test.go:generic-api-key:218"
64+
},
65+
{
66+
"RuleID": "generic-api-key",
67+
"Description": "Detected a Generic API Key, potentially exposing access to various services and sensitive operations.",
68+
"StartLine": 158,
69+
"EndLine": 158,
70+
"StartColumn": 12,
71+
"EndColumn": 79,
72+
"Match": "secrets.EnvSecretKey, \"REDACTED\"",
73+
"Secret": "REDACTED",
74+
"File": "domain/monitor/signals/checks/credential_sweep_test.go",
75+
"SymlinkFile": "",
76+
"Commit": "",
77+
"Entropy": 4.6523914,
78+
"Author": "",
79+
"Email": "",
80+
"Date": "",
81+
"Message": "",
82+
"Tags": [],
83+
"Fingerprint": "domain/monitor/signals/checks/credential_sweep_test.go:generic-api-key:158"
84+
},
85+
{
86+
"RuleID": "generic-api-key",
87+
"Description": "Detected a Generic API Key, potentially exposing access to various services and sensitive operations.",
88+
"StartLine": 158,
89+
"EndLine": 158,
90+
"StartColumn": 12,
91+
"EndColumn": 79,
92+
"Match": "secrets.EnvSecretKey, \"REDACTED\"",
93+
"Secret": "REDACTED",
94+
"File": "domain/monitor/signals/checks/credential_sweep_test.go",
95+
"SymlinkFile": "",
96+
"Commit": "",
97+
"Entropy": 4,
98+
"Author": "",
99+
"Email": "",
100+
"Date": "",
101+
"Message": "",
102+
"Tags": [
103+
"decoded:base64",
104+
"decode-depth:1"
105+
],
106+
"Fingerprint": "domain/monitor/signals/checks/credential_sweep_test.go:generic-api-key:158"
107+
},
108+
{
109+
"RuleID": "generic-api-key",
110+
"Description": "Detected a Generic API Key, potentially exposing access to various services and sensitive operations.",
111+
"StartLine": 21,
112+
"EndLine": 21,
113+
"StartColumn": 8,
114+
"EndColumn": 88,
115+
"Match": "devLegacyKey = \"REDACTED\"",
116+
"Secret": "REDACTED",
117+
"File": "domain/secrets/legacy_encryption.go",
118+
"SymlinkFile": "",
119+
"Commit": "",
120+
"Entropy": 4,
121+
"Author": "",
122+
"Email": "",
123+
"Date": "",
124+
"Message": "",
125+
"Tags": [],
126+
"Fingerprint": "domain/secrets/legacy_encryption.go:generic-api-key:21"
127+
},
128+
{
129+
"RuleID": "generic-api-key",
130+
"Description": "Detected a Generic API Key, potentially exposing access to various services and sensitive operations.",
131+
"StartLine": 356,
132+
"EndLine": 356,
133+
"StartColumn": 12,
134+
"EndColumn": 79,
135+
"Match": "secrets.EnvSecretKey, \"REDACTED\"",
136+
"Secret": "REDACTED",
137+
"File": "domain/worker/monitoring_checks_test.go",
138+
"SymlinkFile": "",
139+
"Commit": "",
140+
"Entropy": 4.6523914,
141+
"Author": "",
142+
"Email": "",
143+
"Date": "",
144+
"Message": "",
145+
"Tags": [],
146+
"Fingerprint": "domain/worker/monitoring_checks_test.go:generic-api-key:356"
147+
},
148+
{
149+
"RuleID": "generic-api-key",
150+
"Description": "Detected a Generic API Key, potentially exposing access to various services and sensitive operations.",
151+
"StartLine": 356,
152+
"EndLine": 356,
153+
"StartColumn": 12,
154+
"EndColumn": 79,
155+
"Match": "secrets.EnvSecretKey, \"REDACTED\"",
156+
"Secret": "REDACTED",
157+
"File": "domain/worker/monitoring_checks_test.go",
158+
"SymlinkFile": "",
159+
"Commit": "",
160+
"Entropy": 4,
161+
"Author": "",
162+
"Email": "",
163+
"Date": "",
164+
"Message": "",
165+
"Tags": [
166+
"decoded:base64",
167+
"decode-depth:1"
168+
],
169+
"Fingerprint": "domain/worker/monitoring_checks_test.go:generic-api-key:356"
170+
},
171+
{
172+
"RuleID": "generic-api-key",
173+
"Description": "Detected a Generic API Key, potentially exposing access to various services and sensitive operations.",
174+
"StartLine": 27,
175+
"EndLine": 27,
176+
"StartColumn": 3,
177+
"EndColumn": 77,
178+
"Match": "devKey = \"REDACTED\"",
179+
"Secret": "REDACTED",
180+
"File": "infra/crypto/crypto.go",
181+
"SymlinkFile": "",
182+
"Commit": "",
183+
"Entropy": 4,
184+
"Author": "",
185+
"Email": "",
186+
"Date": "",
187+
"Message": "",
188+
"Tags": [],
189+
"Fingerprint": "infra/crypto/crypto.go:generic-api-key:27"
190+
}
191+
]

backend/cmd/openapi/merge.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,3 @@ func cloneMap(in map[string]any) map[string]any {
238238
}
239239
return out
240240
}
241-

backend/domain/certs/test_fixture_test.go

Lines changed: 0 additions & 56 deletions
This file was deleted.

backend/domain/lifecycle/projection/updater_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ func TestReadAndApplyAppInstanceProjection(t *testing.T) {
112112
}
113113
}
114114

115-
116115
func newProjectionAppRecord() *core.Record {
117116
collection := core.NewBaseCollection("app_instances")
118117
record := core.NewRecord(collection)

backend/domain/routes/apps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ func validateAppComposeConfig(e *core.RequestEvent, serverID string, projectDir
794794
tempPath := filepath.Join(projectDir, tempName)
795795

796796
if serverID == "local" {
797-
if err := os.WriteFile(tempPath, []byte(content), 0o600); err != nil {
797+
if err := os.WriteFile(tempPath, []byte(content), 0o600); err != nil {
798798
return fmt.Errorf("write temp compose file: %w", err)
799799
}
800800
defer func() {

backend/domain/software/service/service_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ func TestLastActionFromOperationMapsTerminalStatus(t *testing.T) {
220220
})
221221
if action == nil {
222222
t.Fatal("expected last action summary")
223+
return
223224
}
224225
if action.Action != string(software.ActionReinstall) {
225226
t.Fatalf("expected reinstall action, got %q", action.Action)
@@ -237,6 +238,7 @@ func TestLastActionFromOperationMapsAttentionRequired(t *testing.T) {
237238
})
238239
if action == nil {
239240
t.Fatal("expected last action summary")
241+
return
240242
}
241243
if action.Result != "attention_required" {
242244
t.Fatalf("expected attention_required result, got %q", action.Result)

backend/domain/worker/appos_agent_bindings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ func mergeRuntimeEnv(existing map[string]string, injected map[string]string) map
8585
merged[key] = value
8686
}
8787
return merged
88-
}
88+
}

backend/domain/worker/appos_agent_bindings_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ func TestApplyServerExecutionBindings_AppOSAgentPrefersExplicitBaseURL(t *testin
4141
if baseURL != "https://console.example.com:8443" {
4242
t.Fatalf("expected explicit app url to win, got %q", baseURL)
4343
}
44-
}
44+
}

backend/domain/worker/lifecycle_operations.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,6 @@ func (w *Worker) executorFor(execCtx *lifecycleExecutionContext) lifecycleruntim
744744
return execCtx.executor
745745
}
746746

747-
748747
func (w *Worker) operationActor(operation *core.Record) (string, string) {
749748
if operation == nil {
750749
return "", ""

0 commit comments

Comments
 (0)