@kkarhan I wrote a post compile hook for platformio that patches the values into the compiled binary. :thisisfine:
Conversation
Notices
-
Embed this notice
Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Monday, 09-Dec-2024 00:36:57 JST Ryan Castellucci :nonbinary_flag:
-
Embed this notice
Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Monday, 09-Dec-2024 08:50:33 JST Ryan Castellucci :nonbinary_flag:
@attie @kkarhan I've gone with a post build step that patches the binary.
-
Embed this notice
Attie Grande (attie@chaos.social)'s status on Monday, 09-Dec-2024 08:50:34 JST Attie Grande
@ryanc @kkarhan Is there no support for using environment variables(?!) ... put the secrets into a .gitignore'd *.env file (or CI variables)... or use the same to produce a header as a pre-build step.
-
Embed this notice
Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Monday, 09-Dec-2024 08:56:20 JST Ryan Castellucci :nonbinary_flag:
@attie I think it's a bit cursed, but it's also nice the build binaries that can be patched like that because you can distribute them with a patching tool, or even make a downloader that'll bake in given values.
-
Embed this notice
Attie Grande (attie@chaos.social)'s status on Monday, 09-Dec-2024 08:56:21 JST Attie Grande
@ryanc I saw - a perfectly valid route! 😄
-
Embed this notice
Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Monday, 09-Dec-2024 09:01:58 JST Ryan Castellucci :nonbinary_flag:
@attie why have a config file when you can make a self patching binary?
-
Embed this notice
Attie Grande (attie@chaos.social)'s status on Monday, 09-Dec-2024 09:01:59 JST Attie Grande
@ryanc Yeah, totally valid imo! I've taken this route with some commercial projects - just allocate a chunk of space and patch in the config on the production line.
-
Embed this notice
Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Tuesday, 10-Dec-2024 00:42:48 JST Ryan Castellucci :nonbinary_flag:
-
Embed this notice
Thomas Guyot-Sionnest (dermoth@noc.social)'s status on Tuesday, 10-Dec-2024 00:42:56 JST Thomas Guyot-Sionnest
@ryanc @kkarhan do you have a public repo for that? I just bought a few microcontrollers to play with and that might be handy...
-
Embed this notice