You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🔴 Missing JSON Schema enforcement for mutual exclusivity
The schema documents mutually exclusive fields (branches/branches-ignore, paths/paths-ignore) in $comment fields but doesn't use JSON Schema's not constraint to enforce them.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Comprehensive analysis of field dependencies and interactions across schema, parser, documentation, and real workflows revealed 7 inconsistencies.
Inconsistency Breakdown:
Critical Issues
🔴 Missing JSON Schema enforcement for mutual exclusivity
The schema documents mutually exclusive fields (branches/branches-ignore, paths/paths-ignore) in
$commentfields but doesn't use JSON Schema'snotconstraint to enforce them.Evidence:
pkg/parser/schemas/main_workflow_schema.json:292, 300, 308, 316pkg/workflow/compiler_filters_validation.go:87-103Impact: Schema validation tools won't catch these errors; only the compiler validates them at runtime.
Recommendation: Add JSON Schema
allOf+notconstraints:{ "allOf": [ { "not": { "required": ["branches", "branches-ignore"] } } ] }🟡 allow-urls requires ssl-bump but dependency not enforced
Schema documents: "URL patterns to allow for HTTPS traffic (requires ssl-bump: true)" but there's no validation enforcing this dependency.
Evidence:
pkg/parser/schemas/main_workflow_schema.json:2180pkg/workflow/firewall.go:207docs/src/content/docs/reference/network.mdImpact: Users could specify
allow-urlswithoutssl-bump, leading to silent failure or confusion.Recommendation: Add validation in
pkg/workflow/frontmatter_extraction_security.goorfirewall.go.Documentation Gaps
View oneOf Format Documentation Issues (4 findings)
Finding: oneOf alternatives not consistently explained
The schema defines 14 fields with
oneOfalternatives (string|object, boolean|string, etc.):on(string | object)permissions(string enum | object)runs-on(string | array | object)concurrency(string | object)env(object | string)environment(string | object)container(string | object)network(string enum | object)sandbox(boolean | string enum | object)plugins(array | object)steps(object | array)post-steps(object | array)cache(object | array)roles(string enum "all" | array)Specific gaps:
envstring format: Schema allowsenv: stringbut it's not documented or clearly handled in parsertype: stringmap[string]anyinpkg/workflow/frontmatter_extraction_security.go:312sandboxboolean option: Schema includes boolean but docs don't cover itoneOf: [boolean, string, object]pkg/workflow/frontmatter_extraction_security.go:173-177(logs warning)sandbox: truehas no effect (treated as unconfigured)cachearray format: Multiple caches allowed but unclear when to useoneOf: [object, array]rolessemantics: Difference between"all"string vs array unclearoneOf: [string enum "all", array].github/workflows/release.mdusesroles: [admin, maintainer]Schema Improvements Needed
notconstraints for mutually exclusive fields (branches/branches-ignore, paths/paths-ignore)dependentRequiredforallow-urls→ requiresssl-bump: truedependentRequiredforssl-bump→ should validate AWF sandbox (or document SRT behavior)env: stringoneOf option - appears unused, consider removingParser Updates Required
Add validation:
allow-urlsrequiresssl-bump: truepkg/workflow/firewall.goorfrontmatter_extraction_security.goallow-urlsexists, ensuressl-bumpis trueAdd validation:
ssl-bumpwith non-AWF sandboxpkg/workflow/firewall.gossl-bump: true, validate sandbox type is AWF or document SRT behaviorClarify
env: stringhandlingpkg/workflow/frontmatter_extraction_security.goRecommendations
allow-urls→ssl-bumpdependency validation (prevents user confusion)notconstraints for mutual exclusivityenv: stringformat from schemassl-bump+ sandbox type validation or document behaviorStrategy Performance
Strategy Name: Cross-Component Interaction Analysis
What made it unique:
Effectiveness: ⭐⭐⭐⭐
Novel insights:
Analysis Methodology
References:
Beta Was this translation helpful? Give feedback.
All reactions