{"id":18896160,"url":"https://github.com/tenable/nasl","last_synced_at":"2026-03-09T20:31:48.957Z","repository":{"id":56885160,"uuid":"2497552","full_name":"tenable/nasl","owner":"tenable","description":"A parser for NASL.","archived":false,"fork":false,"pushed_at":"2022-11-30T17:18:58.000Z","size":209,"stargazers_count":47,"open_issues_count":3,"forks_count":18,"subscribers_count":16,"default_branch":"master","last_synced_at":"2026-02-15T08:41:54.911Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.tenable.com/products/nessus","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tenable.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2011-10-02T01:35:01.000Z","updated_at":"2026-01-15T05:58:27.000Z","dependencies_parsed_at":"2022-08-20T13:00:06.034Z","dependency_job_id":null,"html_url":"https://github.com/tenable/nasl","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/tenable/nasl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenable%2Fnasl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenable%2Fnasl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenable%2Fnasl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenable%2Fnasl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tenable","download_url":"https://codeload.github.com/tenable/nasl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenable%2Fnasl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30310759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T08:32:43.541Z","updated_at":"2026-03-09T20:31:48.925Z","avatar_url":"https://github.com/tenable.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Installation\n\n[![Gem Version](http://img.shields.io/gem/v/nasl.svg?style=flat-square)](https://rubygems.org/gems/nasl)\n[![Build Status](http://img.shields.io/travis/tenable/nasl.svg)](https://travis-ci.org/tenable/nasl)\n\n## Git\n\nInstalling the source from Git is done as follows:\n\n    git clone git://github.com/tenable/nasl.git\n\n## Gem\n\n\nInstalling the package from RubyGems is done as follows:\n\n    gem install nasl\n\n# Usage\n\n## Standalone\n\nTo avoid conflicting with the NASL interpreter, the NASL gem's binary is\ninstalled as `nasl-parse`. As an application, it has very few actions that it\ncan perform.\n\n* Benchmark: This benchmarks the time taken to parse the input path(s) over a\n  number of iterations. The number of iterations can be adjusted by the `-i`\n  switch.\n\n        % nasl-parse -i 10 benchmark /opt/nessus/lib/nessus/plugins/ssl_certificate_chain.nasl\n        -------------------------[ ssl_certificate_chain.nasl ]-------------------------\n        Rehearsal --------------------------------------------\n        Tokenize   1.687500   0.000000   1.687500 (  1.688397)\n        Parse      1.835938   0.015625   1.851562 (  1.857094)\n        ----------------------------------- total: 3.539062sec\n        \n                       user     system      total        real\n        Tokenize   1.304688   0.015625   1.320312 (  1.319951)\n        Parse      1.046875   0.000000   1.046875 (  1.046957)\n        -------------------------[ ssl_certificate_chain.nasl ]-------------------------\n\n* Parse: This parses the input path(s) and indicates whether the parse was\n  successful.\n\n        % nasl-parse parse /opt/nessus/lib/nessus/plugins/ssl_certificate_chain.nasl\n        -------------------------[ ssl_certificate_chain.nasl ]-------------------------\n        Successfully parsed the contents of the file.\n        -------------------------[ ssl_certificate_chain.nasl ]-------------------------\n\n* Test: This runs unit tests distributed with the application. Specific unit\n  tests can be specified on the command line, otherwise all tests will be run.\n\n        % nasl-parse test\n        Run options:\n        \n        # Running tests:\n        \n        .............................................................................\n        \n        Finished tests in 11.773983s, 6.5398 tests/s, 33493.8487 assertions/s.\n        \n        77 tests, 394356 assertions, 0 failures, 0 errors, 0 skips\n\n* Tokenize: This tokenizes the input path(s) and prints the token/byte-range\n  pairs to stdout.\n\n        % nasl-parse tokenize /opt/nessus/lib/nessus/plugins/ssl_certificate_chain.nasl\n        -------------------------[ ssl_certificate_chain.nasl ]-------------------------\n        [COMMENT,              0...1076]\n        [IF,                1076...1079]\n        [LPAREN,            1079...1080]\n        [IDENT,             1080...1091]\n        [CMP_LT,            1091...1093]\n        ...\n        -------------------------[ ssl_certificate_chain.nasl ]-------------------------\n\n* XML: This parses the input path(s), and then prints an XML representation of\n  the parse tree to stdout.\n\n        % nasl-parse xml /opt/nessus/lib/nessus/plugins/ssl_certificate_chain.nasl\n        -------------------------[ ssl_certificate_chain.nasl ]-------------------------\n        \u003ctree\u003e\n          \u003cif\u003e\n            \u003cexpression\u003e\n              \u003cop\u003e\u0026lt;\u003c/op\u003e\n              \u003clvalue\u003e\n        ...\n        -------------------------[ ssl_certificate_chain.nasl ]-------------------------\n\n# Library\n\nThe primary users of this gem are [Pedant][pedant] and [Nasldoc][nasldoc]. Other\nuses are encouraged, of course! The `Parser` class is the most useful part,\nobviously, and can be used as follows:\n\n    require 'nasl'\n\n    tree = Nasl::Parser.new.parse(file_contents, path_to_file)\n\nThat's all there is to it. If there are any errors, it'll throw an instance of\n`ParseException` that will include as much context about the error as possible.\n\nDevelopment\n-----------\n\nThis project uses [Bundler](http://bundler.io/).\n\nIf you have a brand-new Debian machine, do this as root:\n\n    apt-get install ruby-dev rubygems git\n    gem install bundler\n\nAs your regular user:\n\n    git clone https://github.com/tenable/nasl\n    cd nasl\n    bundle install --path vendor/bundle\n    bundle exec rake grammars\n    bundle exec rake test\n\nAll the tests should pass!\n\nTo run the nasl-parse command line, do `bundle exec ./bin/nasl-parse`, which should give\na help message.\n\n[nasldoc]: https://github.com/tenable/nasldoc\n[pedant]: https://github.com/tenable/pedant\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftenable%2Fnasl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftenable%2Fnasl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftenable%2Fnasl/lists"}