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: tools/ci-build/sdk-lockfiles/README.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,12 +31,35 @@ Error: there are lockfile audit failures
31
31
32
32
This tool is intended for automated use.
33
33
34
-
## Limitation
34
+
## Limitations
35
+
### Unable to audit dependencies in `CargoDependency.kt`
35
36
The `sdk-lockfiles` tool does not verify whether new dependencies introduced in [CargoDependency.kt](https://github.com/smithy-lang/smithy-rs/blob/main/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt)
36
37
are included in the SDK lockfile. This is because dependencies in `CargoDependency.kt` are represented as a Kotlin data
37
38
class. Consequently, dependencies added via the code generator, `inlineable`, or `aws-inlineable` are not considered by
38
39
`sdk-lockfiles`.
39
40
40
-
This limitation is acceptable for our operational purposes. Our release script always executes
41
-
`./gradlew aws:sdk:syncAwsSdkLockfile`, which ensures that any dependencies added in `CargoDependency.kt` are properly
41
+
This limitation is acceptable for our operational purposes. Our release script [always executes
42
+
`./gradlew aws:sdk:syncAwsSdkLockfile`](https://github.com/smithy-lang/smithy-rs/blob/b62000e4d733ca06bc98fd9b57c91468718b8f9f/tools/ci-scripts/generate-smithy-rs-release#L36), which ensures that any dependencies added in `CargoDependency.kt` are properly
42
43
reflected in the SDK lockfile.
44
+
45
+
### False positives
46
+
The `sdk-lockfiles` tool may report false positives based on the contents of a lockfile. For example, if a section of
47
+
the lockfile appears as follows
48
+
```
49
+
pin-project v1.1.5
50
+
├── tower v0.4.13
51
+
│ ├── aws-smithy-experimental v0.1.4
52
+
│ ├── aws-smithy-http-server v0.63.3
53
+
│ │ └── aws-smithy-http-server-python v0.63.2
54
+
│ ├── aws-smithy-http-server-python v0.63.2
55
+
...
56
+
```
57
+
the tool cannot identify which dependent crate of `tower` enables `tower`'s Cargo feature to include `pin-project`.
58
+
In the case above, `aws-smithy-experimental` does not enable this feature, while `aws-smithy-http-server` does.
59
+
Among the Smithy runtime crates above, only `aws-smithy-experimental` is used by SDKs. When `aws-smithy-experimental`
60
+
is compiled for a generated SDK without server-related Smithy runtime crates, `pin-project` will not appear in the
61
+
SDK lockfile. Therefore, while it may appear that `aws-smithy-experimental` depends on `pin-project`, it is a false
62
+
positive for the audit.
63
+
64
+
To address this limitation, we maintain a list of known false positives in `false-positives.txt`. Any dependency
65
+
included in this file will not be flagged as an audit error.
0 commit comments