Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

atna-audit

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atna-audit - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

11

index.js

@@ -5,3 +5,2 @@ 'use strict';

var os = require('os');
var libxml = require('libxmljs');
var fs = require('fs');

@@ -183,12 +182,2 @@

function validateAudit(auditXml) {
var xsd = fs.readFileSync(__dirname + '/rfc-3881.xsd').toString();
var xsdDoc = libxml.parseXml(xsd);
var xml = libxml.parseXml(auditXml);
if (!xml.validate(xsdDoc)) {
throw new Error('XML audit not valid according to XSD:\n' + xml.validationErrors);
}
}
exports.validateAudit = validateAudit;
function wrapInSyslog(msg) {

@@ -195,0 +184,0 @@ return '<85>1 ' + new Date().toISOString() + ' ' + os.hostname() + ' atna-audit.js ' + process.pid + ' IHE+RFC-3881 - ' + msg;

2

package.json
{
"name": "atna-audit",
"version": "0.3.0",
"version": "0.4.0",
"description": "Assists in the creation of ATNA audit trail messages for IHE profiles.",

@@ -5,0 +5,0 @@ "main": "index.js",

'use strict';
var fs = require('fs');
var libxml = require('libxmljs');
var atna = require('./index');
function validateAudit(auditXml) {
var xsd = fs.readFileSync(__dirname + '/rfc-3881.xsd').toString();
var xsdDoc = libxml.parseXml(xsd);
var xml = libxml.parseXml(auditXml);
if (!xml.validate(xsdDoc)) {
throw new Error('XML audit not valid according to XSD:\n' + xml.validationErrors);
}
}
exports.validateAudit = validateAudit;
var syslog = atna.wrapInSyslog('test');

@@ -9,7 +21,7 @@ console.log(syslog);

var audit = atna.userLoginAudit(atna.OUTCOME_SUCCESS, 'openhim', 'openhim.org', 'testUser', 'testRole', '123');
atna.validateAudit(audit);
validateAudit(audit);
console.log(audit);
audit = atna.appActivityAudit(true, 'openhim', 'openhim.org');
atna.validateAudit(audit);
validateAudit(audit);
console.log(audit);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc