this post was submitted on 22 Sep 2023
19 points (95.2% liked)

appsec

367 readers
3 users here now

A community for all things related to application security.

founded 2 years ago
MODERATORS
all 11 comments
sorted by: hot top controversial new old
[–] ExtraMedicated@lemmy.world 8 points 2 years ago (2 children)

You shouldn't be hard-coding API keys, and definitely not committing them to the repository.

[–] tmRgwnM9b87eJUPq@lemmy.world 1 points 2 years ago (1 children)

For local development you would definitely keep them in a config file. Nothing wrong with that.

For production they are set during the release process.

Nothing is more expensive than developers needing to find all the configs and keys to just start up a project to make a small fix somewhere.

[–] pixxelkick@lemmy.world 3 points 2 years ago (1 children)

A config file outside of the repository to be specific.

On Linux it can go somewhere under ~

On windows it can go somewhere in AppData

Ie; ~/YourAppName/Secrets.json or whatever your config file flavor is. Json, yaml, xml, whatevs

[–] tmRgwnM9b87eJUPq@lemmy.world 1 points 2 years ago (1 children)

No. For development purposes I want my devs to be able to clone the repo and start.

So the development config files are inside the repositories.

[–] DoomBot5@lemmy.world 0 points 2 years ago (1 children)

Wow, that's a terrible security process even for development configs. How about adding a script they can run right after cloning to pull the needed keys from a secure location using their own user credentials? Plenty of solutions out there.

[–] tmRgwnM9b87eJUPq@lemmy.world 0 points 2 years ago

So let’s say the code base leaks.

Let’s say our VPN was also compromised.

Then what is the worst that can happen? Some internal dev api with no real data in it can be tested by hackers.

[–] dingleberry@discuss.tchncs.de 3 points 2 years ago

Dear God. That's like the first thing you'd test internally. We really do be moving fast, breaking things.