mirror of
https://github.com/logos-messaging/packages.git
synced 2026-01-05 15:43:13 +00:00
Add check for git://github.com URLs
This commit is contained in:
parent
6d91cfad04
commit
4d697d9fc6
@ -10,6 +10,7 @@
|
|||||||
# * Missing tags
|
# * Missing tags
|
||||||
# * Missing description
|
# * Missing description
|
||||||
# * Missing/unknown license
|
# * Missing/unknown license
|
||||||
|
# * Insecure git:// url on GitHub
|
||||||
#
|
#
|
||||||
# Usage: nim c -d:ssl -r package_scanner.nim
|
# Usage: nim c -d:ssl -r package_scanner.nim
|
||||||
#
|
#
|
||||||
@ -101,7 +102,7 @@ proc check(): int =
|
|||||||
echo "E: ", name, " has no URL"
|
echo "E: ", name, " has no URL"
|
||||||
result.inc()
|
result.inc()
|
||||||
|
|
||||||
elif not canFetchNimbleRepository(name, pdata["web"]):
|
elif pdata.hasKey("web") and not canFetchNimbleRepository(name, pdata["web"]):
|
||||||
result.inc()
|
result.inc()
|
||||||
|
|
||||||
elif not pdata.hasKey("tags"):
|
elif not pdata.hasKey("tags"):
|
||||||
@ -116,6 +117,10 @@ proc check(): int =
|
|||||||
echo "E: ", name, " has no license"
|
echo "E: ", name, " has no license"
|
||||||
result.inc()
|
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:
|
else:
|
||||||
# Other warnings should go here
|
# Other warnings should go here
|
||||||
if not (pdata["license"].str in LICENSES):
|
if not (pdata["license"].str in LICENSES):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user