Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/campaign-generator.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions .github/workflows/workflow-skill-extractor.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions pkg/parser/schemas/main_workflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2330,6 +2330,11 @@
"description": "Optional version/tag for the container image (e.g., 'latest', 'v1.0.0')",
"examples": ["latest", "v1.0.0"]
},
"entrypoint": {
"type": "string",
"description": "Optional custom entrypoint for the MCP gateway container. Overrides the container's default entrypoint.",
"examples": ["/bin/bash", "/custom/start.sh", "/usr/bin/env"]
},
"args": {
"type": "array",
"items": {
Expand All @@ -2344,6 +2349,21 @@
},
"description": "Arguments to add after the container image (container entrypoint arguments)"
},
"mounts": {
"type": "array",
"description": "Volume mounts for the MCP gateway container. Each mount is specified using Docker mount syntax: 'source:destination:mode' where mode can be 'ro' (read-only) or 'rw' (read-write). Example: '/host/data:/container/data:ro'",
"items": {
"type": "string",
"pattern": "^[^:]+:[^:]+:(ro|rw)$",
"description": "Mount specification in format 'source:destination:mode'"
},
"examples": [
[
"/host/data:/container/data:ro",
"/host/config:/container/config:rw"
]
]
},
"env": {
"type": "object",
"patternProperties": {
Expand Down
5 changes: 3 additions & 2 deletions pkg/workflow/expression_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func validateSingleExpression(expression string, opts ExpressionValidationOption
// Match pattern: something || something_else
orPattern := regexp.MustCompile(`^(.+?)\s*\|\|\s*(.+)$`)
orMatch := orPattern.FindStringSubmatch(expression)
if orMatch != nil && len(orMatch) > 2 {
if len(orMatch) > 2 {
leftExpr := strings.TrimSpace(orMatch[1])
rightExpr := strings.TrimSpace(orMatch[2])

Expand All @@ -237,7 +237,8 @@ func validateSingleExpression(expression string, opts ExpressionValidationOption

if leftIsSafe {
// Check if right side is a literal string (single, double, or backtick quotes)
isStringLiteral := regexp.MustCompile(`^(['"\x60]).*\1$`).MatchString(rightExpr)
// Note: Using (?:) for non-capturing group and checking each quote type separately
isStringLiteral := regexp.MustCompile(`^'[^']*'$|^"[^"]*"$|^` + "`[^`]*`$").MatchString(rightExpr)
// Check if right side is a number literal
isNumberLiteral := regexp.MustCompile(`^-?\d+(\.\d+)?$`).MatchString(rightExpr)
// Check if right side is a boolean literal
Expand Down
18 changes: 18 additions & 0 deletions pkg/workflow/frontmatter_extraction_security.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,13 @@ func (c *Compiler) extractMCPGatewayConfig(mcpVal any) *MCPGatewayRuntimeConfig
}
}

// Extract entrypoint (optional container entrypoint override)
if entrypointVal, hasEntrypoint := mcpObj["entrypoint"]; hasEntrypoint {
if entrypointStr, ok := entrypointVal.(string); ok {
mcpConfig.Entrypoint = entrypointStr
}
}

// Extract port
if portVal, hasPort := mcpObj["port"]; hasPort {
switch v := portVal.(type) {
Expand Down Expand Up @@ -414,6 +421,17 @@ func (c *Compiler) extractMCPGatewayConfig(mcpVal any) *MCPGatewayRuntimeConfig
}
}

// Extract mounts (volume mounts for container)
if mountsVal, hasMounts := mcpObj["mounts"]; hasMounts {
if mountsSlice, ok := mountsVal.([]any); ok {
for _, mount := range mountsSlice {
if mountStr, ok := mount.(string); ok {
mcpConfig.Mounts = append(mcpConfig.Mounts, mountStr)
}
}
}
}

return mcpConfig
}

Expand Down
Loading