Skip to content

Commit

Permalink
chore: use env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Sep 19, 2024
1 parent 4aa5777 commit c6a604a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions plugins/kontinuous-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
12 changes: 6 additions & 6 deletions plugins/kontinuous-ui/pre-deploy/01-deployment_event.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
const { createClient } = require("@supabase/supabase-js")

Check failure on line 1 in plugins/kontinuous-ui/pre-deploy/01-deployment_event.js

View workflow job for this annotation

GitHub Actions / Lint

Unable to resolve path to module '@supabase/supabase-js'

Check failure on line 1 in plugins/kontinuous-ui/pre-deploy/01-deployment_event.js

View workflow job for this annotation

GitHub Actions / Lint

"@supabase/supabase-js" is not found

module.exports = async (_manifests, _options, { config }) => {
module.exports = async (_manifests, _options, { config, ctx }) => {
const processEnv = ctx.get("env") || process.env
const { SUPABASE_URL: supabaseUrl, SUPABASE_KEY: supabaseKey } = processEnv
console.log("ENV", processEnv, supabaseUrl, supabaseKey)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This logs sensitive data returned by
process environment
as clear text.
const {
actionCommandName,
gitSha,
projectName,
environment,
refLabelValue,
repositoryName,
actionCommandName,
} = config

const supabase = createClient(
"https://dabwsunwcukreynmegja.supabase.co",
"XXXX"
)
const supabase = createClient(supabaseUrl, supabaseKey)

const { error } = await supabase.from("deployments_logs").insert([
{
Expand Down

0 comments on commit c6a604a

Please sign in to comment.