{"record":{"id":"d96f9303bab9a7e9","repo":"ytti/oxidized","slug":"pfsense-missing-in-config-file","errorCode":null,"errorMessage":"<pfsense> missing in config file!","messagePattern":"<pfsense> missing in config file!","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/oxidized/model/pfsense.rb","lineNumber":14,"sourceCode":"class PfSense < Oxidized::Model\n  using Refinements\n\n  # use other use than 'admin' user, 'admin' user cannot get ssh/exec. See issue #535\n\n  cmd :secret do |cfg|\n    cfg.gsub! /(\\s+<bcrypt-hash>).+?(<\\/bcrypt-hash>)/, '\\\\1[secret hidden]\\\\2'\n    cfg.gsub! /(\\s+<password>).+?(<\\/password>)/, '\\\\1[secret hidden]\\\\2'\n    cfg.gsub! /(\\s+<lighttpd_ls_password>).+?(<\\/lighttpd_ls_password>)/, '\\\\1[secret hidden]\\\\2'\n    cfg\n  end\n\n  cmd 'cat /cf/conf/config.xml' do |cfg|\n    raise \"<pfsense> missing in config file!\" unless cfg.include? \"<pfsense>\"\n\n    cfg.gsub! /\\s<revision>\\s*<time>\\d*<\\/time>\\s*.*\\s*.*\\s*<\\/revision>/, ''\n    cfg.gsub! /\\s<last_rule_upd_time>\\d*<\\/last_rule_upd_time>/, ''\n    cfg.gsub! /\\s<created>\\s*<time>\\d*<\\/time>\\s*.*CDATA\\[Auto\\].*\\s*.*\\s*<\\/created>/, ''\n    cfg\n  end\n\n  # The comment output has to be at the end since and XML file may not start\n  # with a comment.\n\n  cmd 'cat /etc/version' do |version|\n    xmlcomment \"PFsense #{version}\"\n  end\n\n  metadata :bottom do\n    xmlcomment interpolate_string(\n      vars(\"metadata_bottom\") ||\n      vars(\"metadata_top\") ||","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/ytti/oxidized/blob/687ed4262d9d21e54662e872e2383386d8498f7b/lib/oxidized/model/pfsense.rb#L1-L32","documentation":"Error \"<pfsense> missing in config file!\" thrown in ytti/oxidized.","triggerScenarios":"Thrown at lib/oxidized/model/pfsense.rb:14 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"687ed4262d9d21e54662e872e2383386d8498f7b","analyzedAt":"2026-08-23T11:19:42.084Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}