The detection for insecure transport DS137138 returns false positives
See original GitHub issueThis is regarding the message for insecure transport (HTTP)
https://github.com/Microsoft/DevSkim/blob/master/guidance/DS137138.md
This seems to come for any use of the word http
, which might be too broad.
For example, in the popular JavaScript framework Angular (v2+), there’s a class call Http
, which is an Http(s) AJAX client (a wrapper for browser AJAX / fetch functionality).
You’d inject this client in your code in a way a bit like this:
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
@Injectable()
export class SomeService {
constructor(private http: Http) {
// ...
}
}
however, DevSkim does not like this. It shows the following message for the constructor
line above
[Devskim: Finding DS137138]
Insecure URL
Severity: [Moderate]
An HTTP-based URL without TLS was detected.
Fix Guidance: Update to an HTTPS-based URL if possible.
More Info:
https://github.com/Microsoft/DevSkim/blob/master/guidance/DS137138.md
In this case, the constructor line is not creating a URL though. The statement An HTTP-based URL without TLS was detected
is incorrect.
Would it make sense to check for http:
instead of http
here?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
QID 150263 Insecure Transport for https false positive
The intention of this QID is to give users information about what links can be requested over HTTP. The QID will test the...
Read more >Address false positives/negatives in Microsoft Defender for ...
Classify an alert. Alerts can be classified as false positives or true positives in the Microsoft 365 Defender portal. Classifying alerts helps ...
Read more >Spot False Positives in Static Scans: Insecure Randomness
Those values are used as a source of randomness in a security-sensitive context to transport data when encryption really should be used instead....
Read more >Insecure transport fortify fix
One example of a way Empty Password could be a false positive is if the input ... tolerance The detection for insecure transport...
Read more >Reducing the incidence of malformed MIME false positives
The higher the number, the sensitivity lowers and reduces the incidence of false positives. To disable malformed MIME container detection,.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good catch - the suggestion of including the : makes a lot of sense, and this is a pretty easy change.
I am using DevSkim (version 0.3.1) and have the same issue. I am using VS2017 15.9.4. When will the fix be in the VS Marketplace?