aws-delivlib 13.5.19 → 13.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/cdk.out/tree.json +391 -391
- package/lib/custom-resource-handlers/src/certificate-signing-request.tsbuildinfo +1 -1
- package/lib/custom-resource-handlers/src/pgp-secret.tsbuildinfo +1 -1
- package/lib/custom-resource-handlers/src/private-key.tsbuildinfo +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/index.ts +1 -0
- package/lib/package-integrity/handler/JSONStream.d.ts +29 -0
- package/lib/package-integrity/handler/integrity.d.ts +103 -0
- package/lib/package-integrity/handler/integrity.js +238 -0
- package/lib/package-integrity/handler/integrity.ts +316 -0
- package/lib/package-integrity/handler/repository.d.ts +81 -0
- package/lib/package-integrity/handler/repository.js +111 -0
- package/lib/package-integrity/handler/repository.ts +185 -0
- package/lib/package-integrity/handler/validate.bundle.js +604234 -0
- package/lib/package-integrity/handler/validate.d.ts +2 -0
- package/lib/package-integrity/handler/validate.js +37 -0
- package/lib/package-integrity/handler/validate.sh +5 -0
- package/lib/package-integrity/handler/validate.ts +41 -0
- package/lib/package-integrity/index.d.ts +1 -0
- package/lib/package-integrity/index.js +14 -0
- package/lib/package-integrity/index.ts +1 -0
- package/lib/package-integrity/integrity.d.ts +64 -0
- package/lib/package-integrity/integrity.js +64 -0
- package/lib/package-integrity/integrity.ts +112 -0
- package/package.json +17 -9
package/README.md
CHANGED
|
@@ -815,6 +815,36 @@ const stack = new MyStack(...);
|
|
|
815
815
|
Aspects.of(stack).add(new EcrMirrorAspect(ecrMirrorStack.mirror));
|
|
816
816
|
```
|
|
817
817
|
|
|
818
|
+
## Package Integrity
|
|
819
|
+
|
|
820
|
+
To ensure the artifacts published into package managers exactly correspond to your source code, delivlib offers a `PackageIntegrityValidation` construct.
|
|
821
|
+
It will perform periodic integrity checks, comparing the published artifact against an artifact directly build from source code.
|
|
822
|
+
|
|
823
|
+
This can help detect scenarios where your publishing platform may have been compromised, and your packages no longer contain the expected bits.
|
|
824
|
+
|
|
825
|
+
```ts
|
|
826
|
+
// first import the secret containing your github token secret.
|
|
827
|
+
// the secret value should be the token in plain text.
|
|
828
|
+
const token = sm.Secret.fromSecretCompleteArn(stack, 'GitHubSecret', '<sercet-arn>');
|
|
829
|
+
|
|
830
|
+
// validate integrity of your package, hosted in a github repository.
|
|
831
|
+
new PackageIntegrityValidation(stack, 'PackageValidation', {
|
|
832
|
+
repository: '<repository-slug>',
|
|
833
|
+
buildImage: codebuild.LinuxBuildImage.fromDockerRegistry('<docker-image>'),
|
|
834
|
+
githubTokenSecret: token,
|
|
835
|
+
});
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
At a high level, the validation is performed like so:
|
|
839
|
+
|
|
840
|
+
1. Clone the GitHub repository and checkout to the latest tag.
|
|
841
|
+
2. Build the repository to produce local artifacts from the source code.
|
|
842
|
+
3. Download the corresponding artifacts from package managers.
|
|
843
|
+
4. Compare.
|
|
844
|
+
|
|
845
|
+
By default the validation will run once a day, but you can configure its schedule using the `schedule` option.
|
|
846
|
+
If the validation fails, a CloudWatch alarm will be triggered, which is accessible via the `failureAlarm` property.
|
|
847
|
+
|
|
818
848
|
## Contributing
|
|
819
849
|
|
|
820
850
|
See the [contribution guide](./CONTRIBUTING.md) for details on how to submit
|