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
Copy file name to clipboardExpand all lines: Changelog.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,8 @@
1
1
# FOSSA CLI Changelog
2
2
3
+
## 3.14.1
4
+
- Add fork-aliasing. Use this if you are using a fork of a dependency, but want FOSSA to treat it as if you were using the base version that you forked from. ([#1620](https://github.com/fossas/fossa-cli/pull/1620))
5
+
3
6
## 3.14.0
4
7
- Adds `--x-vendetta` flag for vendored dependency identification ([#1607](https://github.com/fossas/fossa-cli/pull/1607))
Copy file name to clipboardExpand all lines: docs/references/files/fossa-deps.md
+67Lines changed: 67 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,60 @@ vendored-dependencies:
91
91
92
92
For more details, please refer to the [feature](../../features/vendored-dependencies.md) walk through.
93
93
94
+
### `fork-aliases:`
95
+
96
+
Denotes mapping of fork dependencies to their base dependencies. This is useful when you have forked a dependency and want it to be treated as the base dependency by FOSSA. This, for example, will allow FOSSA to find and report security issues that are associated with the root project.
97
+
98
+
As an example, if you have forked the Serde crate in a private repository and called it `my-serde`, then you could tell FOSSA to tranlate `my-serde` to `serde` like this:
99
+
100
+
```yaml
101
+
fork-aliases:
102
+
- fork:
103
+
type: cargo
104
+
name: my-serde
105
+
base:
106
+
type: cargo
107
+
name: serde
108
+
```
109
+
110
+
- `fork`: The fork dependency entry that should be aliased to the base dependency. (Required)
111
+
- `type`: Type of the fork dependency. (Required)
112
+
- `name`: Name of the fork dependency. (Required)
113
+
- `version`: Version of the fork dependency. See "version matching rules" below for more details. (Optional)
114
+
- `base`: The base dependency that your fork should be aliased to. (Required)
115
+
- `type`: Type of the base dependency. (Required)
116
+
- `name`: Name of the base dependency. (Required)
117
+
- `version`: Version of the base dependency. See "version matching rules" below for more details. (Optional)
118
+
- `labels`: An optional list of labels to be added to the fork alias. The dependency in FOSSA's UI will be treated as a normal dependency, so if you use an `org` scope for the label it will be applied to all versions of the base dependency across your organization. We suggest using the `project` or `revision` scope for labels on fork aliases.
119
+
120
+
**Version Matching rules:**
121
+
- If `fork` version is specified, only that exact version will be translated
122
+
- If `fork` version is not specified, any version will be translated to the base dependency. The version of the translated dependency depends on whether the base version is specified or not.
123
+
124
+
- If `base` version is specified, the dependency will always be translated to the specified version
125
+
- If `base` version is not specified, the original version from the fork is preserved
126
+
127
+
```yaml
128
+
fork-aliases:
129
+
- fork:
130
+
type: cargo
131
+
name: my-serde
132
+
base:
133
+
type: cargo
134
+
name: serde
135
+
labels:
136
+
- label: internal
137
+
scope: project
138
+
- fork:
139
+
type: cargo
140
+
name: my-serde
141
+
version: 1.0.0 # Only version 1.0.0 will be translated
142
+
base:
143
+
type: cargo
144
+
name: serde
145
+
version: 2.0.0 # Will always translate to version 2.0.0
146
+
```
147
+
94
148
## Labels
95
149
96
150
Each kind of dependency referenced above can have a `labels` field, which is a list of labels to be added to the dependency.
Copy file name to clipboardExpand all lines: docs/references/files/fossa-deps.schema.json
+78-23Lines changed: 78 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,31 @@
42
42
],
43
43
"description": "Name of the distribution OS."
44
44
},
45
+
"dependency-type": {
46
+
"enum": [
47
+
"bower",
48
+
"cargo",
49
+
"carthage",
50
+
"composer",
51
+
"cpan",
52
+
"renv",
53
+
"gem",
54
+
"git",
55
+
"go",
56
+
"hackage",
57
+
"hex",
58
+
"maven",
59
+
"npm",
60
+
"nuget",
61
+
"paket",
62
+
"pub",
63
+
"pypi",
64
+
"cocoapods",
65
+
"swift",
66
+
"url"
67
+
],
68
+
"description": "Type of the dependency. It informs FOSSA which relevant registries to search for dependency's distribution."
69
+
},
45
70
"referenced-app-dependency": {
46
71
"properties": {
47
72
"name": {
@@ -50,29 +75,7 @@
50
75
"description": "Name of the dependency. This name will be used to search for dependency in relevant registries."
51
76
},
52
77
"type": {
53
-
"enum": [
54
-
"bower",
55
-
"cargo",
56
-
"carthage",
57
-
"composer",
58
-
"cpan",
59
-
"renv",
60
-
"gem",
61
-
"git",
62
-
"go",
63
-
"hackage",
64
-
"hex",
65
-
"maven",
66
-
"npm",
67
-
"nuget",
68
-
"paket",
69
-
"pub",
70
-
"pypi",
71
-
"cocoapods",
72
-
"swift",
73
-
"url"
74
-
],
75
-
"description": "Type of the dependency. It informs FOSSA which relevant registries to search for dependency's distribution."
78
+
"$ref": "#/$defs/dependency-type"
76
79
},
77
80
"version": {
78
81
"type": "string",
@@ -330,6 +333,51 @@
330
333
"version"
331
334
],
332
335
"additionalProperties": false
336
+
},
337
+
"fork-alias-entry": {
338
+
"properties": {
339
+
"type": {
340
+
"$ref": "#/$defs/dependency-type"
341
+
},
342
+
"name": {
343
+
"type": "string",
344
+
"minLength": 1,
345
+
"description": "Name of the dependency. This name will be used to search for dependency in relevant registries."
346
+
},
347
+
"version": {
348
+
"type": "string",
349
+
"description": "Version of the dependency. It informs FOSSA which version of the dependency to scan. Optional. See [fork aliases documentation](./fossa-deps.md#fork-aliases) for more information."
350
+
}
351
+
},
352
+
"required": [
353
+
"type",
354
+
"name"
355
+
],
356
+
"additionalProperties": false
357
+
},
358
+
"fork-alias": {
359
+
"properties": {
360
+
"fork": {
361
+
"$ref": "#/$defs/fork-alias-entry",
362
+
"description": "The fork dependency entry that should be aliased to the base dependency."
363
+
},
364
+
"base": {
365
+
"$ref": "#/$defs/fork-alias-entry",
366
+
"description": "The base/original dependency entry that your fork should be aliased to."
367
+
},
368
+
"labels": {
369
+
"type": "array",
370
+
"description": "Optional labels to be applied to the fork alias.",
371
+
"items": {
372
+
"$ref": "#/$defs/label"
373
+
}
374
+
}
375
+
},
376
+
"required": [
377
+
"fork",
378
+
"base"
379
+
],
380
+
"additionalProperties": false
333
381
}
334
382
},
335
383
"type": "object",
@@ -364,6 +412,13 @@
364
412
"items": {
365
413
"$ref": "#/$defs/remote-dependency"
366
414
}
415
+
},
416
+
"fork-aliases": {
417
+
"type": "array",
418
+
"description": "Fork aliases to map your fork dependencies to their base dependencies. Matching: if fork version is specified, only that exact version matches; if not specified, any version matches. Translation: if base version is specified, always use that version; if not specified, preserve the original version.",
0 commit comments