MetaFam / TheGame

The platform that MetaGame will be played on aka MetaOS - an open source framework for running decentralized societies. Currently featuring MyMeta Profiles, Dashboard & Quests
https://metagame.wtf
Other
128 stars 77 forks source link

Web3.Storage Access Key Is Published To The Client #1750

Open dysbulic opened 1 month ago

dysbulic commented 1 month ago

What happened?

If you look at the sources sent to the client, it includes a configuration object that looks like:

{
  appEnv: eA.env.APP_ENV || "development",
  nodeEnv: "production",
  graphqlURL: "https://api.metagame.wtf/v1/graphql",
  infuraId: eA.env.NEXT_PUBLIC_INFURA_ID || "781d8466252d47508e177b8637b1c2fd",
  brightIdAppURL: eA.env.NEXT_BRIGHTID_APP_URL || "https://app.brightid.org",
  brightIdNodeURL: eA.env.NEXT_BRIGHTID_NODE_URL || "http:%2f%2fnode.brightid.org",
  publicURL: "https://metagame.wtf",
  gaId: "G-B1NKK3Q1BP",
  honeybadgerAPIKey: "hbp_2DxpssgdezjXwuKwGih237lnOkXWsD4FUOqE",
  get useHoneybadger() {
      return "production" === this.appEnv && !!this.honeybadgerAPIKey
  },
  userbackToken: "37882|74240|mjn1zXGiYaozZR6qmqFfjl9Sk",
  discordAPIBaseUrl: eA.env.DISCORD_API_BASE_URL || "https://discord.com/api/v8",
  ceramicURL: "https://ceramic.metagame.wtf",
  ceramicNetwork: eA.env.NEXT_PUBLIC_CERAMIC_NETWORK || "mainnet",
  googleDataAPIKey: "AIzaSyBxF0dE-OkUvWRFFxK6Y024gq4dyahd_yU",
  web3StorageToken: eA.env.NEXT_PUBLIC_WEB3_STORAGE_TOKEN,
  web3StorageKey: "MgCZa50IvgpP7ykO1ZyibcbvxplW+Sk5ERsB2YGZgPLNSmO0B63sdY+6lyvnvIgTxjkWlRJd24In+rLjGeY8ad8WG8xc=",
  web3StorageDID: "did:key:z6MkgSqgKhSscJfmSWvcBf4DmmRhGHnb5L3E3h4gMbRoA5Cw",
  web3StorageProof: eA.env.WEB3_STORAGE_PROOF,
  openseaAPIKey: "5fcc9afed4f042c4a3b6918d19a0fa60",
  alchemyAPIKey: eA.env.NEXT_PUBLIC_ALCHEMY_API_KEY,
  mainnetRPC: eA.env.NEXT_PUBLIC_MAINNET_RPC || "https://eth.llamarpc.com",
  calendarEndpoint: "/api/events",
  gcal: {
      calendarId: "nih59ktgafmm64ed4qk6ue8vv4",
      privateKey: null === (em = eA.env.GCAL_PRIVATE_KEY) || void 0 === em ? void 0 : em.replace(/\\n/g, "\n"),
      clientEmail: eA.env.GCAL_CLIENT_EMAIL,
      projectNumber: eA.env.GCAL_PROJECT_NUMBER,
      scopes: ["https://www.googleapis.com/auth/calendar"],
      whitelist: ["https://metagame.wtf", "https://*.metagame.wtf", "https://frontend-pr-*-mjhnbmqqna-uk.a.run.app"]
  }
}

Note:

What did you expect to happen?

I expected more secrets to be kept. 😼

How can we reproduce the problem (as minimally as possible)?

Umm, load the page & search the sources for something that appears in the above dump of the CONFIG object.

Is there anything else we need to know?

No response

Browser and operating system used (if applicable)

No response