Install the Threat Stack AppSec Microagent

Follow these steps to instrument an application with the Threat Stack AppSec microagent.

Node.js
  1. If you are installing from a locally downloaded version of the microagent, open the Command Line window and run the following command to verify the integrity of the download:
    {{shasum -a 256 bluefyre-agent-node.tgz
      a70959f1259e425195ad0fb21359c41b36a25bb3d6f1438e4a16b1947c243e69= bluefyre-agent-node-1.2.18.tgz  }}
                 
  2. From the Command Line window, go to your Node application.
  3. Run one of the following commands to install the microagent:

    Threat Stack AppSec installs.

  4. Add a line of code to your Node.js application to initialize the Threat Stack AppSec microagent.
    1. Edit the entry point of your application, typically the index.js or server.js file.
    2. In the first line of the file, add the following command:
      var agent = require('bluefyre-agent-node')
    3. Save the file. Threat Stack AppSec now sends information back to the server when your application runs.
Python
  1. Add the following command to your application's requirements file:
    threatstack-agent-python
  2. From the Command Line window, install the dependencies using the following command:
    pip install -r requirements

The Threat Stack AppSec installs.

Note

  • If you install your application on Mac OSX, then run the brew install swig command to build the Threat Stack AppSec Python microgent. If you install your application on any other distribution or operating system, then run the make command to build the Threat Stack AppSec Python microagent.
  • To ensure you use the latest version of the Threat Stack AppSec Python microagent, in the Command Line window, run the following command:
    pip install -threatstack-agent-python -U
Ruby
  1. Add the following to your application’s gem file:
    gem "threatstack-agent-ruby", :source => "https://pkg.threatstack.com/appsec/ruby/"
  2. From the Commmand Line window, run the following command to install the dependencies:
    bundle install

    Note

    Run the make command to build the Threat Stack AppSec Ruby microagent (for example, build-essential Ubuntu package).

  3. To ensure you use the latest version of the Threat Stack AppSec Ruby microagent, you can run the following command from the Command Line window:
    bundle update threatstack-agent-ruby
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request