Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
enketo-validate
Advanced tools
Validate ODK XForms using Enketo's form engine
This app can be used:
Live demo web application (meant for testing purposes only) that uses Enketo Validate (and ODK Validate) as a module: validate.enketo.org (source code)
apt-get install build-essential
apt-get install ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils
To make the enketo-validate
command available from any folder on your machine.
$ npm install -g --production enketo-validate
Alternatively, you can clone the repo and run npm install --production
. This will make the ./validate
command available from within the clone folder. Running npm link
makes the enketo-validate
command available from any folder on your machine.
$ enketo-validate path/to/form.xml
Errors are returned to stderr
and warnings to stdout
. If there is no stderr
output the form is valid.
$ enketo-validate --help
npm install -g --production enketo-validate
npm install enketo-validate --save
const validator = require('enketo-validate');
// Options:
// debug: [boolean] outputs unadulterated errors instead of cleaned ones
// openclinica: [boolean] runs the validator in a special OpenClinica mode
const options = {};
// Read the xform as string
const result = validator.validate( xformStr, options );
// The result has the following format:
// {
// warnings: [ 'a warning', 'another warning'],
// errors: ['an error', 'another error'],
// version: "0.0.0"
// }
// if errors.length is 0, the form passed validation
yarn install
. If there is an error the first thing to do is to run rm -R node_modules
and retry especially after changing Node versions or after earlier crashes during installation../validate test/xform/xpath-fails.xml
or ./validate --help
.In it's current iteration, the validator does the following:
nodeset
exists in the primary instance.<bind>
whether the relevant
, constraint
, calculate
, and required
expressions are supported and valid* XPath.<label>
elements exist.* Note, that /path/to/a/nonexisting/node
is perfectly valid XPath.
The development of this application was funded by OpenClinica.
See the license document for this application's license.
See change log.
FAQs
An XForm validator around Enketo's form engine
We found that enketo-validate 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.