Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let res;
await parseString(pubxmlFile, (error, result) => {
if(!!error) {
throw new Error("Failed XML parsing " + error);
}
res = result.publishData.publishProfile[0].$;
});
let creds: scmCredentials = {
uri: res.publishUrl.split(":")[0],
username: res.userName,
password: res.userPWD
};
// masking kudu password
core.setSecret('${creds.password}');
if(creds.uri.indexOf("scm") < 0) {
throw new Error("Publish profile does not contain kudu URL");
}
creds.uri = `https://${creds.uri}`;
// setting application url
this.applicationURL = res.destinationAppUrl;
return creds;
}
}
}
// AWS_DEFAULT_REGION and AWS_REGION:
// Specifies the AWS Region to send requests to
core.exportVariable('AWS_DEFAULT_REGION', region);
core.exportVariable('AWS_REGION', region);
// Get the AWS account ID
const sts = new aws.STS({
customUserAgent: 'configure-aws-credentials-for-github-actions'
});
const identity = await sts.getCallerIdentity().promise();
const accountId = identity.Account;
core.setOutput('aws-account-id', accountId);
if (!maskAccountId || maskAccountId.toLowerCase() == 'true') {
core.setSecret(accountId);
}
}
catch (error) {
core.setFailed(error.message);
}
}
Object.entries(parsedSecret).forEach(([key, value]) => {
core.setSecret(value)
core.exportVariable(key, value)
})
} else {