
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
validation-monitoring-module-test
Advanced tools
This module is used to validate publications in the context of the Flemish government.
The Validation Monitoring Module is an npm module designed to safeguard the integrity of data published to a triple store, crucial in scenarios involving multiple publishers. It meticulously compares publications against a predefined data blueprint, pinpointing discrepancies and enforcing data structure compliance according to specified standards.
Crafted with Test-Driven Development (TDD) principles at its core, this npm module emphasizes reliability and robustness from the ground up. Developed in TypeScript for enhanced type safety and transpiled to JavaScript for wide-ranging compatibility, it incorporates an extensive suite of Jest tests. This rigorous testing approach ensures the module performs reliably under various scenarios, making it a trustworthy addition to any Node.js project.
Publications must meet structural requirements to ensure consistency and readability. The module supports validation for the following document types:
- Besluitenlijst
- Notule
- Agenda
In addition to specific document types, each publication is required to have a title, validated as a string to ensure it is present and correctly formatted. For "Notule" documents, there is an additional requirement to validate the maturity level, ensuring that these documents not only meet structural standards but also adhere to designated maturity criteria, adding a layer of depth to the validation process.
In order to properly validate an agenda item exists in a publication, we need to know the following:
- Agenda item
- title
- resolution
- vote
- decision
- Session
- time
- governing body
└── validation-monitoring-module/
├── README.md
├── files
│ └── notulen.ttl
├── jest.config.js
├── package-lock.json
├── package.json
├── src
│ ├── index.ts
│ ├── queries.ts
│ ├── tests
│ └── validation.ts
├── tsconfig.json
├── tslint.json
├── tsup.config.ts
└── yarn.lock
source
- Clone the validation-monitoring-module repository:
$ git clone https://github.com/lblod/validation-monitoring-tool
- Change to the project directory:
$ cd validation-monitoring-module
- Install the dependencies:
$ > npm install
npm
- Install the module from npm:
$ > npm install validation-monitoring-module
To use the module, import it into your project:
import { validatePublication, getBlueprintOfDocumentType, fetchDocument } from 'validation-monitoring-module/index';
Then, call the
validatePublication
function with the publication data to validate:
const blueprint: Bindings[] = await getBlueprintOfDocumentType('Notulen'); const publication: Bindings[] = await fetchDocument(NOTULEN_LINK, PROXY); const validationResult = await validatePublication(publication, blueprint);
The
validatePublication
function returns an array of subjects. Each subject is structured as follows:
[key: number]: { name: string, totalCount: number, type: string, typeName: string, url: string, usedShape: string, validCount: number, validatedProperties: { [key: number]: { name: string, }
Run the test suite using the command below:
npm run test
Link to the full documentation here.
FAQs
This module is used to validate publications in the context of the Flemish government.
The npm package validation-monitoring-module-test receives a total of 6 weekly downloads. As such, validation-monitoring-module-test popularity was classified as not popular.
We found that validation-monitoring-module-test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.