Skip to content
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

add environmental variables and set up secret detection #1508

Closed
wants to merge 3 commits into from

Conversation

zxt-tzx
Copy link
Contributor

@zxt-tzx zxt-tzx commented May 31, 2022

First commit closes #1261.

  • Issue: currently npm run dev is not working because env-cmd is expecting an env file in the root directory
  • Solution: It adds an .env.example file to the backend, updates the README to tell the user to duplicate a .env file. After doing so, npm run dev will work properly.

Second commit is based on Postman's PR opengovsg/postmangovsg#1554, which was made after we our previous secret detection linter failed to pick up secret. We experimented with a few options and detect-secrets work the best.

  • Issue: currently, ts-template does not have secret detection
  • Solution: add detect-secrets

Not sure if I've set up the ci.yml and husky hooks properly — would be good to have someone look through them!

@zxt-tzx
Copy link
Contributor Author

zxt-tzx commented May 31, 2022

the GitHub Actions ci seems to be failing here:
image

hmm

Copy link
Contributor

@LoneRifle LoneRifle left a comment

Choose a reason for hiding this comment

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

Can you rework this so that it's inline with current repo state?

  • We don't need .env.example anymore, given that we now have .env.development, so you can drop the first commit.
  • Is there a node equivalent to detect-secrets?

@LoneRifle LoneRifle closed this Mar 11, 2024
@LoneRifle LoneRifle deleted the build/env-detect-secrets branch March 11, 2024 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

include .env.example in root folder
2 participants