-
Notifications
You must be signed in to change notification settings - Fork 9
fix(shell): restart browser sidecar reliably via healthcheck + DinD isolation #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
924b7fa
9dda672
c9531d0
d91380a
c0cef75
a7d99b6
ccb578e
48e563e
35fd964
2d75759
bbd6655
593f3f1
9eae39c
e97a214
c0fa1cd
02bd091
486ae9c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,3 +86,104 @@ export const AgentLogLineSchema = Schema.Struct({ | |
| export type CreateProjectRequestInput = Schema.Schema.Type<typeof CreateProjectRequestSchema> | ||
| export type CreateAgentRequestInput = Schema.Schema.Type<typeof CreateAgentRequestSchema> | ||
| export type CreateFollowRequestInput = Schema.Schema.Type<typeof CreateFollowRequestSchema> | ||
|
|
||
| export const AuthGithubLoginRequestSchema = Schema.Struct({ | ||
| label: Schema.optional(Schema.NullOr(Schema.String)), | ||
| token: Schema.optional(Schema.NullOr(Schema.String)), | ||
| scopes: Schema.optional(Schema.NullOr(Schema.String)), | ||
| envGlobalPath: Schema.String | ||
| }) | ||
|
|
||
| export const AuthGithubStatusRequestSchema = Schema.Struct({ | ||
| envGlobalPath: Schema.String | ||
| }) | ||
|
|
||
| export const AuthGithubLogoutRequestSchema = Schema.Struct({ | ||
| label: Schema.optional(Schema.NullOr(Schema.String)), | ||
| envGlobalPath: Schema.String | ||
| }) | ||
|
|
||
| export const AuthCodexLoginRequestSchema = Schema.Struct({ | ||
| label: Schema.optional(Schema.NullOr(Schema.String)), | ||
| codexAuthPath: Schema.String | ||
| }) | ||
|
|
||
| export const AuthCodexStatusRequestSchema = Schema.Struct({ | ||
| label: Schema.optional(Schema.NullOr(Schema.String)), | ||
| codexAuthPath: Schema.String | ||
| }) | ||
|
|
||
| export const AuthCodexLogoutRequestSchema = Schema.Struct({ | ||
| label: Schema.optional(Schema.NullOr(Schema.String)), | ||
| codexAuthPath: Schema.String | ||
| }) | ||
|
|
||
| export const AuthClaudeLoginRequestSchema = Schema.Struct({ | ||
| label: Schema.optional(Schema.NullOr(Schema.String)), | ||
| claudeAuthPath: Schema.String | ||
| }) | ||
|
|
||
| export const AuthClaudeStatusRequestSchema = Schema.Struct({ | ||
| label: Schema.optional(Schema.NullOr(Schema.String)), | ||
| claudeAuthPath: Schema.String | ||
| }) | ||
|
|
||
| export const AuthClaudeLogoutRequestSchema = Schema.Struct({ | ||
| label: Schema.optional(Schema.NullOr(Schema.String)), | ||
| claudeAuthPath: Schema.String | ||
| }) | ||
|
|
||
| export const StateInitRequestSchema = Schema.Struct({ | ||
| repoUrl: Schema.String, | ||
| repoRef: OptionalString | ||
| }) | ||
|
|
||
| export const StateCommitRequestSchema = Schema.Struct({ | ||
| message: Schema.String | ||
| }) | ||
|
|
||
| export const StateSyncRequestSchema = Schema.Struct({ | ||
| message: Schema.optional(Schema.NullOr(Schema.String)) | ||
| }) | ||
|
|
||
| export const ScrapExportRequestSchema = Schema.Struct({ | ||
| projectDir: Schema.String, | ||
| archivePath: OptionalString | ||
| }) | ||
|
|
||
| export const ScrapImportRequestSchema = Schema.Struct({ | ||
| projectDir: Schema.String, | ||
| archivePath: Schema.String, | ||
| wipe: OptionalBoolean | ||
| }) | ||
|
|
||
| export const SessionsListRequestSchema = Schema.Struct({ | ||
| projectDir: Schema.String, | ||
| includeDefault: OptionalBoolean | ||
| }) | ||
|
|
||
| export const SessionsKillRequestSchema = Schema.Struct({ | ||
| projectDir: Schema.String, | ||
| pid: Schema.Number | ||
| }) | ||
|
|
||
| export const SessionsLogsRequestSchema = Schema.Struct({ | ||
| projectDir: Schema.String, | ||
| pid: Schema.Number, | ||
| lines: Schema.optional(Schema.Number) | ||
|
Comment on lines
+165
to
+173
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Constrain
🤖 Prompt for AI Agents |
||
| }) | ||
|
|
||
| export const McpPlaywrightUpRequestSchema = Schema.Struct({ | ||
| projectDir: Schema.String, | ||
| runUp: OptionalBoolean | ||
| }) | ||
|
Comment on lines
+90
to
+179
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reject empty strings for required path-like inputs. Several required filesystem/config path fields are plain strings, so Please tighten these fields to non-empty trimmed strings at the schema boundary. 🤖 Prompt for AI Agents |
||
|
|
||
| export const ApplyRequestSchema = Schema.Struct({ | ||
| runUp: OptionalBoolean, | ||
| gitTokenLabel: OptionalString, | ||
| codexTokenLabel: OptionalString, | ||
| claudeTokenLabel: OptionalString, | ||
| cpuLimit: OptionalString, | ||
| ramLimit: OptionalString, | ||
| enableMcpPlaywright: OptionalBoolean | ||
| }) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical security violation: privileged container with disabled TLS.
The DinD service configuration violates security best practices:
privileged: true(line 5): Grants the container full access to host devices and kernel capabilities, bypassing Docker's isolation model. Any compromise of this container grants root-equivalent access to the host.DOCKER_TLS_CERTDIR: ""(line 7): Disables TLS encryption and authentication for the Docker daemon.DOCKER_HOST: tcp://dind:2375(line 22): Uses unencrypted TCP connection without authentication. Any container on the same network can execute arbitrary Docker commands on this daemon.Combined risk: An attacker who compromises the
apicontainer or any container on the same network can control the DinD daemon without authentication, create privileged containers, and escape to the host system.Recommended alternatives:
tecnativa/docker-socket-proxy) with minimal permissions instead of full DinDDOCKER_TLS_CERTDIR=/certs) and configure mTLS between api and dindAs per coding guidelines: "Reject PRs with unsafe Docker/GitHub Actions configuration such as privileged containers, broad host mounts, unbounded Docker socket access."
🤖 Prompt for AI Agents