aboutsummaryrefslogtreecommitdiff
path: root/package_scanner.nim
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2016-06-10 00:48:48 +0100
committerGitHub <noreply@github.com>2016-06-10 00:48:48 +0100
commitc669bfe2e3922c65d35adcd4cab6502cd0eeca80 (patch)
tree2a86af34eeccdacbeac77716dab6be76f789ea64 /package_scanner.nim
parent090d5e171bc333f08036cbcefe884b00782ace44 (diff)
parent4d697d9fc6a0a23fe3e448aed0ad8d5ea2a93b9a (diff)
downloadpackages-c669bfe2e3922c65d35adcd4cab6502cd0eeca80.tar.gz
packages-c669bfe2e3922c65d35adcd4cab6502cd0eeca80.zip
Merge pull request #363 from def-/https-git
Use secure https instead of insecure git protocol
Diffstat (limited to 'package_scanner.nim')
-rw-r--r--package_scanner.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/package_scanner.nim b/package_scanner.nim
index a41fde0..e66417f 100644
--- a/package_scanner.nim
+++ b/package_scanner.nim
@@ -10,6 +10,7 @@
# * Missing tags
# * Missing description
# * Missing/unknown license
+# * Insecure git:// url on GitHub
#
# Usage: nim c -d:ssl -r package_scanner.nim
#
@@ -101,7 +102,7 @@ proc check(): int =
echo "E: ", name, " has no URL"
result.inc()
- elif not canFetchNimbleRepository(name, pdata["web"]):
+ elif pdata.hasKey("web") and not canFetchNimbleRepository(name, pdata["web"]):
result.inc()
elif not pdata.hasKey("tags"):
@@ -116,6 +117,10 @@ proc check(): int =
echo "E: ", name, " has no license"
result.inc()
+ elif pdata["url"].str.normalize.startsWith("git://github.com/"):
+ echo "E: ", name, " has an insecure git:// URL instead of https://"
+ result.inc()
+
else:
# Other warnings should go here
if not (pdata["license"].str in LICENSES):