
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
[](https://circleci.com/gh/wookieb/alpha-ac)
Alpha AC is a simple but powerful Access control system inspired by Symfony2 Voters. The idea is very simple. You ask Alpha AC whether a participant (anonymous, user, system or other) has given a privilege on a subject. For example whether UserParticipant has privilege to "view" the "post".
acl.isAllowed(new Participant.Account(user), "view", post)
.then((isAllowed) => {
// :)
})
This simple approach allows to implement any type of Access system you want.
npm install alpha-ac
import {AccessControl, Rule, Participant} from "alpha-ac";
const ac = new AccessControl();
// Allows user to view/edit post they own
class SimpleRule implements Rule {
supports(privilege: any, subject: any): boolean {
return ['view', 'edit'].indexOf(privilege) !== -1;
}
isAllowed(participant: Participant, privilege: any, subject: any): Promise<boolean>|boolean {
if (Participant.Account.is(participant)) {
return subject.ownerId === participant.account.id;
}
return false;
}
}
ac.registerRule(new SimpleRule());
ac.isAllowed(new Participant.Account(user), "view", post).then(/* ... */)
First you need to create a rule object (might be an instance of class or just an objeect) with 2 methods:
Once you have the object ready register it to AccessControl via "registerRule". The Access control will be looking for the first rule that is able to make decision about given privilege and subject and ask it for a decision.
A participant represents an identity that needs to perform some action on the system.
Alpha AC predefines few kinds of participants but you don't have to use all of them if it's not necessary.
Every participant has "type" property so you can check in your rules what kind of participant you're dealing with.
FAQs
[](https://circleci.com/gh/wookieb/alpha-ac)
We found that alpha-ac demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.