
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
This service is exposing web hook for triggering custom actors.
docker build -t actord .
docker run -P actord
This docker container is limited to work with files in that container, only. You might want to bind folder containing your desired actors to /app/actors. In addition you might e.g. need to bind the socket controlling docker so actors are capable of performing actions beyond scope of this container,
docker run -P -v /path/to/your/actors:/app/actors,ro actord
Keep in mind that scripts of any actor bound this way are still limited to accessing the filesystem of the container by default.
actord
:
useradd -d /dev/null -s /bin/false actord
usermod -L actord
/path/to
in line starting with WorkingDirectory=
with the path name of folder this tool has been extracted to before.User=
.systemctl daemon-reload
.systemctl start actord.service
.journalctl -xeu actord.service
.systemctl enable actord.service
.The following description assumes you have been precisely following instructions on how to run
actord
withsystemd
and thus was extracting its files into folder /opt/actord as well as having created useractord
for running it. Please adopt the following instructions on having chosen different values.
Every actor is defined by adding a subfolder in /opt/actord/actors. For example, the subfolder /opt/actord/actors/some-actor defines an actor named some-actor implicitly.
Such a folder consists of at least two files:
actord
features support for long running actors by detaching them from any triggering request.actord
to prevent the service accidentally modifying or removing either file.actord
and hidden from world access to make it available to the user actord
, only. This prevents other users from reading your .token file or any other sensitive detail about your desired actions.Listing the resulting folder with ls -la
should look like this:
drwxr-x--- 2 actord root 4096 Sep 28 21:43 .
drwxr-xr-x 3 root root 4096 Sep 28 20:42 ..
-rwxr-xr-x 1 root root 86 Sep 28 21:43 run.sh
-rw-r--r-- 1 root root 40 Sep 28 20:43 .token
When running the service with systemd as described before any actor's run.sh script file is run as the non-privileged user actord
. This improves security e.g. for running the service without privileged access, but limits an actor's possibilities in run.sh. However, by using sudo
it is possible to safely elevate actor's permissions:
root
, only. Optionally, replace root
here and in next steps with name of any user you want to run the actor as instead.sudo
by running visudo
for adding this line:
actord = (root) NOPASSWD: /path/to/actord/actors/some-actor/.run.root.sh
sudo -u root /path/to/actord/actors/some-actor/.run.root.sh
Make sure to use the file's absolute path name here so
sudo
is matching lines, properly.
Now, listing the resulting folder with ls -la
should look like this:
drwxr-x--- 2 actord root 4096 Sep 28 21:43 .
drwxr-xr-x 3 root root 4096 Sep 28 20:42 ..
-rwxr-x--- 1 root root 54 Sep 28 21:00 .run.root.sh
-rwxr-xr-x 1 root root 86 Sep 28 21:43 run.sh
-rw-r--r-- 1 root root 40 Sep 28 20:43 .token
All your actor's elevated operations should be placed in .run.root.sh eventually. Consider limiting privileged access to parts of actor essentially requiring it. When running with privileged permissions you should not process any stuff fetched from external sources without another validation.
visudo
again.sudo
in run.sh is addressing .run.root.sh using its absolute path name.sudo
should not need to use a TTY at all it might help adding another line using visudo
:
Defaults!/path/to/actord/actors/some-actor/.run.root.sh !requiretty
actord
is built with hitchy. The latter features support for HTTPS just by using additional command line arguments passed on invoking npm start
to provide names of files containing key and certificate required for SSL encryption:
npm start -- --sslKey=/path/to/key.pem --sslCert=/path/to/cert.pem --sslCaCert=/path/to/chain.pem
FAQs
web service exposing triggerable actors
We found that actord 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.