As a software engineer you regularly produce Work Product Artifacts ( WPAs ) such as source code, documentation, commits, e.t.c. Surveilr can help you gather compliance evidences from these artifacts without having to worry about filling compliance forms. Below are some examples of WPAs that surveilr can help gather compliance evidences from;
Source Code
A source code contains folders and files which means you can execute surveilr ingest files -r source-code-path which then processes all files in your source code and stores it in an RSSD under the uniform resource table. To learn more about surveilr ingest files <COMMAND>, visit ingest files.
Creating RSSD
Suppose your source code is folder is named docs.opsfolio.com and it is located within your current working directory, you can ingest the files in this folder by executing this script:
if otherwise, specify the path to the folder as shown below:
The outcome of the execution of this script above is a resource-surveillance.sqlite.db file ( known as resource surveillance state database - RSSD ) created in your root directory. The database consist of several tables which can be listed out by executing sqlite3 resource-surveillance.sqlite.db which navigates into an sqlite environment in order to run SQL queries against your database ( Note: make sure you have sqlite3 installed before: sudo apt install sqlite3 ), and run the command .tables as shown below which outlines out all the tables that is found in the RSSD.
The uniform_resource table is the table that contains the ingested files which you can execute SQL queries against in order to retrieve data that serves as compliance evidences.
Suppose you want to check the columns present in the uniform_resource table and their structure , you can execute the sql query below:
which then returns this result:
Examples
The following example shows various kinds of SQL queries that can be used to query the database to retrieve compliance evidences.
Unit Tests
surveilr can be used to store the result of running a test in a RSSD. Running a test is an action categorized under task ingestion. To learn more about surveilr ingest tasks, visit ingest tasks.