NodeSecure / NodeSecure/scanner

(tarball): Improve lookup error handling in DnsResolver

Open
#678 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
40
Forks
23
Avg merge
23h 23m
Merged PRs (30d)
2

Description

Improve DnsResolver error handling.

  • We should find a way to log an error when a lookup fail with the Logger class from the scanner.

  • figure it out what to do based on the error code :
    probably return true on those : ( "NOTFOUND", "BADNAME", "NONAME", "BADSTR", "REFUSED", "SERVFAIL") to flag the hostname as a shady link.
    and false for any other.

the docs of the error code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with workspaces/tarball/src/class/DnsResolver.class.ts and compare its lookup failure path with workspaces/scanner/src/class/logger.class.ts. Review the linked Node.js DNS error-code documentation and determine the behavior for the listed codes and other errors. Done means lookup failures are logged and hostname classification follows the agreed return values.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
networking, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.