Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
SERVICES.forEach(name => {
// auth defines scopes, so it doesn't need any of its own.
if (name === 'auth') {
return;
}
const tables = (requirements[`azure-${name}`] || {}).tables || [];
const scopes = [
...(requirements[`scopes-${name}`] || []),
...tables.map(t => 'auth:azure-table:read-write:${azureAccountId}/' + t),
];
scopes.sort(scopeCompare);
staticClients.push({
clientId: `static/taskcluster/${name}`,
scopes: normalizeScopeSet(scopes),
});
});
static normalizeScopeSet(scopes) {
scopes.sort(scopeCompare);
return normalizeScopeSet(scopes);
}