Skip to content

jnawk/codepipeline-token-bug

Repository files navigation

Code Build JSON synthesis bug demo

This project synthesises

  • a CDK Pipeline with a Code Build Step which is fed some JSON that contains tokens in its environment variables,
  • a Code Pipeline with a Code Build Step which is fed some JSON that contains tokens in its environment variables,

The JSON with tokens is the same bit of code.

The CDK Pipeline's Code Build Step Template is correct. It's a Fn::Base64 of a Fn::Sub, the JSON is singly encoded:

"{\"key\": \"value\"}"

The Code Pipeline's Code Build Step Template is NOT correct. It is also a Fn::Base64 of a Fn::Sub, but the JSON is double encoded:

"{\\\"key\\\": \\\"value\\\"}"

About

Simple CDK project demonstrating CDK Pipeline & Code Pipeline JSON encoding inconsistency

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published