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

[C-3510] Re-land typescript env changes #7272

Merged
merged 5 commits into from
Jan 23, 2024
Merged

Conversation

raymondjacobson
Copy link
Member

@raymondjacobson raymondjacobson commented Jan 22, 2024

Description

See commit 7d941e9b5dcc694c4f0da74a6cd4f251da811713 for new changes:

  1. Add an index.html transformer to use our typescript env vars
  2. Rename and fix env var named PUBLIC_URL to BASENAME
  3. Fix rebase issue with env in the coinflow page
  4. Remove sourcemap checks (always on)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.

npm run web:stage
npm run ios:stage

Copy link

gitguardian bot commented Jan 22, 2024

⚠️ GitGuardian has uncovered 64 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
688750 Generic High Entropy Secret f4e02cd packages/mobile/.env.dev View secret
688750 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.stage.ts View secret
688750 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.dev.ts View secret
688750 Generic High Entropy Secret f4e02cd packages/web/.env/.env.dev View secret
688750 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.prod.ts View secret
688750 Generic High Entropy Secret f4e02cd packages/mobile/.env.stage View secret
688750 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.prod.ts View secret
688750 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.dev.ts View secret
688750 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.stage.ts View secret
688750 Generic High Entropy Secret f4e02cd packages/web/.env/.env.prod View secret
688750 Generic High Entropy Secret f4e02cd packages/mobile/.env.prod View secret
688750 Generic High Entropy Secret f4e02cd packages/web/.env/.env.stage View secret
1606949 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.prod.ts View secret
1606949 Generic High Entropy Secret f4e02cd packages/web/.env/.env.prod View secret
1606949 Generic High Entropy Secret f4e02cd packages/mobile/.env.prod View secret
1606949 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.prod.ts View secret
2111319 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.prod.ts View secret
2111319 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.prod.ts View secret
2111319 Generic High Entropy Secret f4e02cd packages/web/.env/.env.prod View secret
2111319 Generic High Entropy Secret f4e02cd packages/mobile/.env.prod View secret
2111319 Generic High Entropy Secret 97f7df8 packages/mobile/src/env/env.prod.ts View secret
2111319 Generic High Entropy Secret 97f7df8 packages/web/src/services/env/env.prod.ts View secret
2111320 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.stage.ts View secret
2111320 Generic High Entropy Secret f4e02cd packages/mobile/.env.stage View secret
2111320 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.stage.ts View secret
2111320 Generic High Entropy Secret f4e02cd packages/web/.env/.env.stage View secret
2111320 Generic High Entropy Secret 97f7df8 packages/mobile/src/env/env.stage.ts View secret
2111320 Generic High Entropy Secret 97f7df8 packages/web/src/services/env/env.stage.ts View secret
2416684 Generic High Entropy Secret f4e02cd packages/web/.env/.env.stage View secret
2416684 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.stage.ts View secret
2416684 Generic High Entropy Secret f4e02cd packages/mobile/.env.stage View secret
2416684 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.stage.ts View secret
2416685 Generic High Entropy Secret f4e02cd packages/web/.env/.env.stage View secret
2416685 Generic High Entropy Secret f4e02cd packages/mobile/.env.stage View secret
2416686 Generic High Entropy Secret f4e02cd packages/mobile/.env.stage View secret
2416686 Generic High Entropy Secret f4e02cd packages/web/.env/.env.stage View secret
2416686 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.stage.ts View secret
2416686 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.stage.ts View secret
2460749 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.prod.ts View secret
2460749 Generic High Entropy Secret f4e02cd packages/web/.env/.env.prod View secret
2460749 Generic High Entropy Secret f4e02cd packages/mobile/.env.prod View secret
2460749 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.prod.ts View secret
2460750 Generic High Entropy Secret f4e02cd packages/mobile/.env.prod View secret
2460750 Generic High Entropy Secret f4e02cd packages/web/.env/.env.prod View secret
2460751 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.prod.ts View secret
2460751 Generic High Entropy Secret f4e02cd packages/web/.env/.env.prod View secret
2460751 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.prod.ts View secret
2460751 Generic High Entropy Secret f4e02cd packages/mobile/.env.prod View secret
2858198 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.prod.ts View secret
2858198 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.prod.ts View secret
2858198 Generic High Entropy Secret f4e02cd packages/mobile/.env.prod View secret
2858198 Generic High Entropy Secret f4e02cd packages/web/.env/.env.prod View secret
2858199 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.stage.ts View secret
2858199 Generic High Entropy Secret f4e02cd packages/mobile/.env.stage View secret
2858199 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.stage.ts View secret
2858199 Generic High Entropy Secret f4e02cd packages/web/.env/.env.stage View secret
2858199 Generic High Entropy Secret 97f7df8 packages/web/src/services/env/env.stage.ts View secret
2858199 Generic High Entropy Secret 97f7df8 packages/mobile/src/env/env.stage.ts View secret
3939057 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.dev.ts View secret
3939057 Generic High Entropy Secret f4e02cd packages/web/.env/.env.dev View secret
3939057 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.dev.ts View secret
3939057 Generic High Entropy Secret f4e02cd packages/mobile/.env.dev View secret
9313975 Generic High Entropy Secret f4e02cd packages/web/src/services/env/env.dev.ts View secret
9313975 Generic High Entropy Secret f4e02cd packages/mobile/src/env/env.dev.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

Copy link

vercel bot commented Jan 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
audius-web-ssr ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 3:28am

@audius-infra
Copy link
Collaborator

It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype

Copy link
Contributor

@sliptype sliptype left a comment

Choose a reason for hiding this comment

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

🔥

{
transformIndexHtml(html) {
// Replace HTML env vars with values from the system env
Object.keys(APP_ENV).forEach((key) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be faster/better to replace all of the matching patterns instead of iterating through each env var. Cause then we can log a warning if any env vars are undefined that we are expecting:

    return html
      .replace(/%(\S+?)%/g, (text: string, key) => {
        if (key in APP_ENV) {
          return APP_ENV[key as keyof typeof APP_ENV] ?? text
        }
        console.warn(`Missing environment variable: ${key}`)
        return text
      })

Copy link
Member Author

Choose a reason for hiding this comment

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

It feels a bit less safe to do a match on all strings inside %, but the warning is nice. I'll change to it

@audius-infra
Copy link
Collaborator

It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype

@audius-infra
Copy link
Collaborator

It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype

@audius-infra
Copy link
Collaborator

Preview this change https://demo.audius.co/rj-re-land-env

@audius-infra
Copy link
Collaborator

It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype

@audius-infra
Copy link
Collaborator

Preview this change https://demo.audius.co/rj-re-land-env

@raymondjacobson raymondjacobson merged commit e147d2e into main Jan 23, 2024
39 of 43 checks passed
@raymondjacobson raymondjacobson deleted the rj-re-land-env branch January 23, 2024 07:18
raymondjacobson added a commit that referenced this pull request Jan 23, 2024
raymondjacobson added a commit that referenced this pull request Jan 23, 2024
audius-infra pushed a commit that referenced this pull request Jan 27, 2024
[a15e3d8] [PAY-2400] Break CoinflowWithdrawModal out into its own modal (#7357) Marcus Pasell
[f4fe982] Limit query length in verbose check (#7360) Raymond Jacobson
[949cdd2] [INF-650] Fix PublicSite history bug (#7356) Sebastian Klingler
[b0ce935] Run docker prune synchronously at the end of jobs (#7355) Danny
[0860c5d] [PAY-2401] Update button/copy of withdrawal (#7351) Raymond Jacobson
[bf769ec] [PAY-40] Make Rewards Modal Scrollable (#7353) Marcus Pasell
[5b0c364] Bump version to 0.6.24 audius-infra
[e693ef6] Use rendezvous when gossiping ops (#7354) Steve Perkins
[5dc8965] Fix redis hoisting in relay (#7349) Theo Ilie
[f1359a9] Update pg_restore to v15 (#7346) Theo Ilie
[07bab83] [C-3729] Move top genre query to use aggregates (#7342) Raymond Jacobson
[8d7720e] Fix docker push-ddex (#7347) Michelle Brier
[c38f442] [C-3728] Add dominant genre support to aggregate_user (#7340) Raymond Jacobson
[0513090] Fix sign up rate-limiting issues (#7344) Dylan Jeffers
[1bcc737] Don't prune most recent images (#7337) Danny
[0cad4ed] [PAY-2354] Specify quality during track download (#7341) Reed
[e73e441] DDEX cleanup and remove unused dependencies (#7339) Michelle Brier
[610fd56] [C-3641] Clear sign up data on log out (#7338) JD Francis
[4f27e83] [INF-571] Add sentry logging to SSR worker (#7331) Sebastian Klingler
[808b195] [PAY-2386] Block add to playlist for library on stream gated (#7299) Raymond Jacobson
[8a38728] [C-3234] Update today date to include time so that tracks uploaded on the same day don't mix (#7335) Kyle Shanks
[e467583] Add mongoDB to ddex webapp (#7330) Michelle Brier
[bd56e2b] Remove GA from protodash build process (#7334) Theo Ilie
[0bdf871] Fix staging web deploy (#7332) Sebastian Klingler
[e19666f] SSR Follow ups (#7318) Sebastian Klingler
[3540e14] Merge "Link SP to Audius Profile" feature branch to main (#7298) nicoback2
[c49b8fc] Bump version to 0.6.23 audius-infra
[138ed9b] TCR Updates: cron and db init (#7324) alecsavvy
[318acec] PROTO-1580: use redis to store aao state and allow initial relay (#7310) alecsavvy
[69299ad] Fix Attestations (again) (#7329) Marcus Pasell
[7d11bd8] Hide audio onramp when all supported providers are not allowed (#7302) Raymond Jacobson
[83efcbe] Misc New Sign Up Select Artist fixes (#7325) JD Francis
[88b6c6a] [PAY-2238] Improve balance display with recovery process (#7322) Randy Schott
[8e53a7f] Fix sign up saga bug on native (#7323) JD Francis
[27f6438] Fix existing discovery attestations (#7320) Marcus Pasell
[692f60a] Update cash copy (#7321) Raymond Jacobson
[c00fad8] Build openresty image on release (#7319) Theo Ilie
[7b53f91] ⚠️ [INF-547] SSR Track Page (#7213) Sebastian Klingler
[d557552] Change redis DN key (#7317) Theo Ilie
[1329083] [QA-733] Dedupe albums and playlists on profile (#7316) Andrew Mendelsohn
[dcc2f61] [PAY-2394][PAY-2391][PAY-2393] Address misc coinflow withdrawal ux (#7312) Raymond Jacobson
[6005824] Fix payment router recovery indexing using wrong address for comparison (#7314) Randy Schott
[d58ac8f] Prune the docker cache more frequently (#7315) Danny
[19ea929] Fix hash routing check in index.html (#7297) Raymond Jacobson
[6b31794] Fix all caps metric name (#7313) JD Francis
[562b388] [C-3668] Improve artist previews (#7308) Dylan Jeffers
[87803d7] [C-3722] Fix scrolling on create login details page (#7311) JD Francis
[0f96753] [PAY-2376] Stems & Downloads section UI visibility according to access (#7275) Reed
[e732d23] [PAY-2372] Web summary table header clickable (#7293) Reed
[d3c5f17] add timeout to ga for faster healthz response (#7296) alecsavvy
[e8707b8] [C-3667] Improve preview hint, remove duplicate navigation (#7307) Dylan Jeffers
[e7863e0] [C-3702 C-3672] Fix sign-up cover-photo issues (#7301) Dylan Jeffers
[ad279c9] [PAY-2389] Perform recoveries via payment router to allow indexing (#7306) Randy Schott
[3b997ca] Bump version to 0.6.22 audius-infra
[0f9430c] Increase crudr sweep interval, add caching. (#7292) Steve Perkins
[439f10b] Add ChallengesApi, RewardManager to SDK (#7026) Marcus Pasell
[3f55d5d] [C-3718] Fix follow-artist metrics (#7305) Dylan Jeffers
[66bd8ab] [C-3712, C-3719] Fix loading of suggested tracks (#7303) Andrew Mendelsohn
[79bd9bc] [C-3697, C-3713, C-3714] Copy updates; add missing overflow menu items (#7304) Andrew Mendelsohn
[8211796] Remove download progress on ios (#7300) Reed
[8c1293d] [C-3575] Moar sign up metrics (#7288) JD Francis
[17f3a6c] [Web][Libs] QA for Link Audius Profile to Dashboard Wallet feature [C-3683] [C-3686] (#7283) nicoback2
[236f571] Fix logged out state track access (#7291) Saliou Diallo
[e78dfb9] Fix logged out state track access on client (#7295) Saliou Diallo
[e87fd07] [PAY-2327] Add stem upload row (#7277) Saliou Diallo
[8e9c243] [C-3703] Reroute away from signup if user already has 3 followees (#7294) JD Francis
[9cd65c6] Re-land #2 of ts env (#7290) Raymond Jacobson
[d9300bf] [C-3710] Continuous playback (#7278) Dylan Jeffers
[460c381] [C-3707] Remove text-input font scale (#7280) Dylan Jeffers
[f401fb3] [C-3716] Update sign up recovery flow for new sign up (#7289) Kyle Shanks
[f118aeb] [PAY-2368] Add lockAmount flag to web withdrawals (#7286) Randy Schott
[4b87ece] [C-3679] Filter out unowned collections from add modal and drawer (#7244) Andrew Mendelsohn
[2245cb9] [PAY-2375] Tag @audius in purchase tweets (#7274) Reed
[3887389] Revert "[C-3510] Re-land typescript env changes (#7272)" (#7287) Raymond Jacobson
[00ca201] use abis within healthz (#7276) alecsavvy
[c75590f] Bump version to 0.6.21 audius-infra
[1023c8d] Updates deprecated vscode settings (#7273) Randy Schott
[1730644] [PAY-2238][PAY-2242][PAY-2248] Adds more robust payment router indexing support (#7249) Randy Schott
[e147d2e] [C-3510] Re-land typescript env changes (#7272) Raymond Jacobson
[4e1b7fe] Fix mobile track pages due to collection check (#7285) Dylan Jeffers
[582c37d] DDEX standalone node (#7281) Michelle Brier
[568d677] Misc Sign Up QA Fixes (#7260) JD Francis
[85061bd] [C-3699, C-3700] Edit albums on mobile (#7270) Andrew Mendelsohn
[0e88152] Use defaults for trending track checks (#7279) Theo Ilie
[20f9ebd] [C-3689] Fix follow artists not happening if you wait too long on sign up (web) (#7257) JD Francis
[a8cca23] Fix desktop track tile title width (#7269) Dylan Jeffers
[81e8c8a] [DVRL-3] optimize image assets (#7238) Sam Gutentag
[df20e33] PROTO-1607: healthz rm GA dependency (#7264) alecsavvy
[fd8929e] [C-3696] Fix lineups and recommendations (#7263) Dylan Jeffers
[bbad3fe] Revert "[C-3510] Move mobile env from system config to ts env (#6935)" (#7268) Raymond Jacobson
[ac119fe] Make ddex tRPC Dockerfile run (#7261) Theo Ilie
[87f81b6] Attempt to circumvent docker-compose regression (#7266) Danny
[b48855b] Bump version to 0.6.20 audius-infra
[739ddf8] qm sync: handle non-200 status, more tests. (#7265) Steve Perkins
[64e38bc] [PAY-2367] Add migration to repair tips (#7252) Raymond Jacobson
[1ebec24] [C-3510] Move mobile env from system config to ts env (#6935) Raymond Jacobson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants