Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
p.secrets = JSON.parse(b64dec(secret.data.secrets));
}
if (secret.data.allowPrivilegedJobs) {
p.allowPrivilegedJobs = b64dec(secret.data.allowPrivilegedJobs) == "true";
}
if (secret.data.allowHostMounts) {
p.allowHostMounts = b64dec(secret.data.allowHostMounts) == "true";
}
if (secret.data.sshKey) {
p.repo.sshKey = b64dec(secret.data.sshKey);
}
if (secret.data.sshCert) {
p.repo.sshCert = b64dec(secret.data.sshCert);
}
if (secret.data["github.token"]) {
p.repo.token = b64dec(secret.data["github.token"]);
}
if (secret.data["kubernetes.cacheStorageClass"]) {
p.kubernetes.cacheStorageClass = b64dec(
secret.data["kubernetes.cacheStorageClass"]
);
}
if (secret.data["kubernetes.buildStorageClass"]) {
p.kubernetes.buildStorageClass = b64dec(
secret.data["kubernetes.buildStorageClass"]
);
}
return p;
}
if (secret.data.secrets) {
p.secrets = JSON.parse(b64dec(secret.data.secrets));
}
if (secret.data.allowPrivilegedJobs) {
p.allowPrivilegedJobs = b64dec(secret.data.allowPrivilegedJobs) == "true";
}
if (secret.data.allowHostMounts) {
p.allowHostMounts = b64dec(secret.data.allowHostMounts) == "true";
}
if (secret.data.sshKey) {
p.repo.sshKey = b64dec(secret.data.sshKey);
}
if (secret.data.sshCert) {
p.repo.sshCert = b64dec(secret.data.sshCert);
}
if (secret.data["github.token"]) {
p.repo.token = b64dec(secret.data["github.token"]);
}
if (secret.data["kubernetes.cacheStorageClass"]) {
p.kubernetes.cacheStorageClass = b64dec(
secret.data["kubernetes.cacheStorageClass"]
);
}
if (secret.data["kubernetes.buildStorageClass"]) {
p.kubernetes.buildStorageClass = b64dec(
secret.data["kubernetes.buildStorageClass"]
);
}
return p;
}