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
- `version`- Project version (must not be empty, should be valid semver)
149
+
- `name`- Project name (must not be empty)
150
+
- `description`- Project description (must not be empty)
151
+
- `link`- Valid project URL (must not be empty, must be valid URL)
152
+
- `license`- Valid license identifier (must not be empty)
153
+
- `logo`(optional) - Valid logo URL (must be valid URL if provided)
154
+
155
+
**Error Messages:**
156
+
- `Module should have oss.yaml`- File is missing from module root
157
+
- `Invalid oss.yaml: <error>` - File exists but contains invalid YAML or structure
158
+
- `no projects described`- File exists but contains an empty list
159
+
- `id must not be empty`- Project entry is missing the `id` field
160
+
- `version must not be empty. Please fill in the parameter and configure CI (werf files for module images) to use these setting. See ADR "platform-security/2026-01-21-oss-yaml-werf.md"`- Project entry is missing the `version` field
161
+
- `version must be valid semver: <error>` (Warning) - Version is provided but not in valid semantic versioning format
162
+
- `name must not be empty`- Project entry is missing the `name` field
163
+
- `description must not be empty`- Project entry is missing the `description` field
164
+
- `link must not be empty`- Project entry is missing the `link` field
165
+
- `link URL is malformed ("<url>")`- Link is provided but is not a valid URL
166
+
- `License must not be empty`- Project entry is missing the `license` field
167
+
- `project logo URL is malformed ("<url>")`- Logo is provided but is not a valid URL
152
168
153
169
**Example:**
154
170
```yaml
155
171
# oss.yaml
156
-
- name: nginx
172
+
- id: nginx/nginx
173
+
version: 1.25.3
174
+
name: nginx
157
175
description: High performance web server
158
176
link: https://nginx.org/
159
177
license: BSD-2-Clause
160
178
logo: https://nginx.org/nginx.png
161
179
162
-
- name: prometheus
180
+
- id: prometheus/prometheus
181
+
version: 2.48.0
182
+
name: prometheus
163
183
description: Monitoring system and time series database
complaints=append(complaints, "id must not be empty")
99
+
errorList.WithObjectID("index="+prefix+";").Error("id must not be empty")
100
+
} else {
101
+
prefix=fmt.Sprintf("#%d (id=%s)", i, p.Id)
108
102
}
109
103
110
104
// Version
111
-
112
105
ifstrings.TrimSpace(p.Version) =="" {
113
-
complaints=append(complaints, "version must not be empty. Please fill in the parameter and configure CI (werf files for module images) to use these setting. See ADR \"platform-security/2026-01-21-oss-yaml-werf.md\"")
106
+
errorList.WithObjectID("index="+prefix+";").Error("version must not be empty. Please fill in the parameter and configure CI (werf files for module images) to use these setting. See ADR \"platform-security/2026-01-21-oss-yaml-werf.md\"")
107
+
} else {
108
+
_, err:=semver.NewVersion(p.Version)
109
+
iferr!=nil {
110
+
errorList.WithObjectID("index="+prefix+";").Warn(fmt.Sprintf("version must be valid semver: %v", err))
111
+
}
114
112
}
115
-
// Name
116
113
114
+
// Name
117
115
ifstrings.TrimSpace(p.Name) =="" {
118
-
complaints=append(complaints, "name must not be empty")
119
-
} else {
120
-
prefix=fmt.Sprintf("#%d (name=%s)", i, p.Name)
116
+
errorList.WithObjectID("index="+prefix+";").Error("name must not be empty")
121
117
}
122
118
123
119
// Description
124
-
125
120
ifstrings.TrimSpace(p.Description) =="" {
126
-
complaints=append(complaints, "description must not be empty")
121
+
errorList.WithObjectID("index="+prefix+";").Error("description must not be empty")
127
122
}
128
123
129
124
// Link
130
-
131
125
ifstrings.TrimSpace(p.Link) =="" {
132
-
complaints=append(complaints, "link must not be empty")
126
+
errorList.WithObjectID("index="+prefix+";").Error("link must not be empty")
0 commit comments