The open source tool was designed to allow developers to identify and solve performance and security issues, it is available on GitHub.
The Microsoft Edge team donated Sonar to the JS Foundation, the tech giant will continue to follow the project improving it along with contributions from external experts.
“Today, we are excited to announce the next evolution of the static scan tool: sonar, a new linting tool and site scanner for the modern web.” states a blog post published by Microsoft.
“sonar brings many improvements compared to previous scanners: execution of website code instead of static analysis, a more flexible and modernized set of rules, parallel test execution, integration with other services, a completely open source code base from day one, and more.”
Sonar is a linting tool that analyzes the code for a wide range of issues, including related to coding errors, performance, accessibility, security, Progressive Web Apps (PWA), and interoperability. Sonar can be used as a command line tool or via an online version.
From the cybersecurity perspective, the tool scans for the following weaknesses:
One of the tests checks for the exposure to MitM attacks due to the use of HTTPS connections that don’t use the Strict-Transport-Security header.
Sonar also checks if the set-cookie header defines the Secure and HttpOnly attributes to prevent session hijacking via cross-site scripting (XSS) attacks. Setting the attributes the cookies cannot be transmitted over HTTP and their value cannot be accessed via JavaScript.
Another test is related to the exposure to attacks that rely on MIME sniffing, Sonar is able to check this kind of vulnerability, the linting tool is also able to determine if a website is running a vulnerable client-side JavaScript library or framework. The latter checks rely on the Snyk’s Vulnerability DB and js-library-detector.
The linting tool can also be used to avoid leakage of potentially sensitive data through the headers, and prevent unauthorized redirects that could lead users to malicious websites.
Sonar can be integrated with several other products, including aXe Core, AMP validator, snyk.io, SSL Labs, and Cloudinary.
[adrotate banner=”9″] | [adrotate banner=”12″] |
(Security Affairs – linting tool, hacking)
[adrotate banner=”5″]
[adrotate banner=”13″]