Skip to content

SCons: Identify build clearly when using AES256 encryption key #107309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Jun 9, 2025

It seems to be a common pitfall that users try to build custom templates with a key but somehow it doesn't get picked up as they expect it to.

Building for platform "linuxbsd", architecture "x86_64", target "editor".

*** IMPORTANT: Compiling Godot with custom `SCRIPT_AES256_ENCRYPTION_KEY` set as environment variable.
*** Make sure to use templates compiled with this key when exporting a project with encryption.

scons: done reading SConscript files.

@Calinou @bruvzg I suggest adding it to the docs so that users know to look for this message in their build logs when troubleshooting.

I also considered whether to print the value of the key so they can confirm it matches their expectations, but chose not to as it might be considered a security issue to print it in clear (e.g. it may be used on CI with a secret).

It seems to be a common pitfall that users try to build custom templates with a key
but somehow it doesn't get picked up as they expect it to.
@bruvzg
Copy link
Member

bruvzg commented Jun 9, 2025

I wonder if we can auto validate it without making the key even less secure, maybe generate some extra metadata file with key hash and check it during export.

The same can also be used to validate if correct template version is used.

Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some indication in the build log is useful, probably won't reduce the number of people not building templates much, but can be used for troubleshooting.

@Calinou
Copy link
Member

Calinou commented Jun 9, 2025

I also considered whether to print the value of the key so they can confirm it matches their expectations, but chose not to as it might be considered a security issue to print it in clear (e.g. it may be used on CI with a secret).

CI services generally perform a string match on logs to redact secrets, but it's not 100% reliable and most CI services recommend not relying on this mechanism.

That said, we could choose to display the first 4 characters so you know you're not using the wrong key (it's 64 characters long, so this only reveals minimal information).

@akien-mga akien-mga modified the milestones: 4.x, 4.5 Jun 10, 2025
@akien-mga akien-mga merged commit b6668cf into godotengine:master Jun 10, 2025
20 checks passed
@akien-mga akien-mga deleted the scons-encryption-key-info-message branch June 10, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants