-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check links and redirects against a domain list
Currently this only includes a very small list of suspicious domains which we want to check as a sort of one-off. We could consider using a third party list of domains (or IP ranges) instead, if this is considered to be valuable.
- Loading branch information
1 parent
e5b8b4a
commit e8a6ffe
Showing
5 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
default: &default | ||
suspicious_domains: | ||
# NOTE: These domains are considered suspicious by GDS corporate IT | ||
# making requests from the corporate network may raise flags. | ||
- nostringsng.com | ||
- www.becauseiamagirl.org | ||
- www.bilebrizoua.ci | ||
# NOTE: This is not a comprehensive list of all suspicious domains on the internet. | ||
|
||
test: | ||
<<: *default | ||
suspicious_domains: | ||
- malicious.example.com | ||
|
||
development: | ||
<<: *default | ||
|
||
production: | ||
<<: *default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,14 @@ | |
include_examples "has no errors" | ||
end | ||
|
||
context "domain is risky" do | ||
let(:uri) { "https://malicious.example.com" } | ||
before { stub_request(:get, uri).to_return(status: 200) } | ||
include_examples "has a problem summary", "Suspicious Destination" | ||
include_examples "has warnings" | ||
include_examples "has no errors" | ||
end | ||
|
||
context "there are credentials in the URI" do | ||
let(:uri) { "https://username:[email protected]/ok" } | ||
include_examples "has a problem summary", "Login details in URL" | ||
|