Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
governify-agreement-analyzer
Advanced tools
This is a Node.js API REST to analyze agreements defined by following the iAgree Specification.
Governify Agreement Analyzer provides some features, such as:
Governify Agreement Analyzer executes all CSP by using the Reasoner tool defined on governify-csp-tools project, which in turn executes the CSP based on MiniZinc language.
Governify Agreement Analyzer has been developed on TypeScript and transpiled to JavaScript in order to be executed as a Node.js module. Also, it has been developed by following the project-template-nodejs development guidelines.
$ npm install governify-agreement-analyzer
You can easily use this library in your project:
// Import
var AgreementAnalyzer = require("governify-agreement-analyzer");
// Configure analyzer
var config = {
agreement: {
file: "agreement.yaml"
},
reasoner: {
type: "api",
folder: "csp_files",
api: {
version: "v2",
server: "https://minizinc.modules.designer.governify.io/module-minizinc",
operationPath: "models/csp/operations/execute"
}
}
};
// Create an Analyzer instance
var analyzer = new AgreementAnalyzer(config);
// Execute an analysis operation
analyzer.isConsistent(function (err, sol) {
if (err) {
// manage error
console.log(err);
} else {
console.log(sol);
}
});
or deploy the analyzer as an API REST service:
// Import Agreement Analyzer API
var AgreementAnalyzerServer = require("governify-agreement-analyzer").api;
var api = new AgreementAnalyzerServer();
var app = require("connect")();
// Start API
api.initialize(app);
Once you deploy the API REST, you can now send a POST request over http://localhost:8080/api/v1/analysis/isConsistent
with the configuration of Analyzer.
You can download agreement.yaml
here.
Follow the analyzer configuration for more details.
An example:
var configuration = {
"agreement": {
"file": "agreement.yaml" // use 'url' property for remote agreements
},
"reasoner": {
"type": "local",
"folder": "csp_files"
}
}
Please, consider:
agreement.file
property to define use an local agreement file located in your project. You can also use agreement.url
to define a remote agreement file.The JSON schema associated to analyzer configuration:
---
type: 'object'
properties:
agreement:
type: 'object'
properties:
file:
type: 'string'
url:
type: 'string'
content:
type: 'object'
reasoner:
# Reasoner configuration of governify-csp-tools project
type: 'object'
properties:
type:
enum:
- 'local'
- 'api'
- 'docker'
folder:
type: 'string'
api:
type: 'object'
properties:
version:
type: 'string'
server:
type: 'string'
operationPath:
type: 'string'
required:
- 'type'
- 'folder'
The version 0.6.6 is the latest stable version of governify-agreement-analyzer component. see release note for details.
For running:
FAQs
Governify Agreement Analyzer
We found that governify-agreement-analyzer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.