<commit_before>var async = require("async")
  , request = require("request")
  , metaMarked = require("meta-marked")
  , github = require("./github")

var ghOpts = {user: "nodesecurity", repo: "nodesecurity-www", path: "advisories"}
var rawUrl = "https://raw.githubusercontent.com/nodesecurity/nodesecurity-www/master/advisories"

var advisories = {}

function getAdvisories () {
  return advisories
}

module.exports.getAdvisories = getAdvisories

function updateAdvisories (cb) {
  cb = cb || function (er) {
    if (er) console.error("Failed to update advisories", er)
  }

  var gh = github.getInstance()

  gh.repos.getContent(ghOpts, function (er, files) {
    if (er) return cb(er)

    var tasks = files.filter(function (a) {
      return a.name != "template.md"
    }).map(function (a) {
      return function (cb) {
        request.get(rawUrl + "/" + a.name, function (er, res, md) {
          if (er || res.statusCode != 200) {
            console.warn("Failed to update advisory", a.name, er)
            return cb()
          }<commit_msg>Add temporary filter for marked redos advisory<commit_after>var async = require("async")
  , request = require("request")
  , metaMarked = require("meta-marked")
  , github = require("./github")

var ghOpts = {user: "nodesecurity", repo: "nodesecurity-www", path: "advisories"}
var rawUrl = "https://raw.githubusercontent.com/nodesecurity/nodesecurity-www/master/advisories"

var advisories = {}

function getAdvisories () {
  return advisories
}

module.exports.getAdvisories = getAdvisories

function updateAdvisories (cb) {
  cb = cb || function (er) {
    if (er) console.error("Failed to update advisories", er)
  }

  var gh = github.getInstance()

  gh.repos.getContent(ghOpts, function (er, files) {
    if (er) return cb(er)

    var tasks = files.filter(function (a) {
      return a.name != "template.md" && a.name != "marked_redos.md"
    }).map(function (a) {
      return function (cb) {
        request.get(rawUrl + "/" + a.name, function (er, res, md) {
          if (er || res.statusCode != 200) {
            console.warn("Failed to update advisory", a.name, er)
            return cb()
          }
{'fraction_non_alphanumeric': 0.14760147601476015, 'fraction_numerical': 0.0027675276752767526, 'mean_word_length': 3.2280701754385963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4676442', 'n_tokens_mistral': 725, 'n_tokens_neox': 697, 'n_words': 174}