mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Report using md5sum for checksums (as info)
This commit is contained in:
parent
657c33e575
commit
ee3d38c177
1 changed files with 19 additions and 0 deletions
|
@ -615,6 +615,25 @@ class Configurations(TestSuite):
|
||||||
"https://github.com/YunoHost/issues/issues/201#issuecomment-391549262"
|
"https://github.com/YunoHost/issues/issues/201#issuecomment-391549262"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@test()
|
||||||
|
def src_file_checksum_type(self):
|
||||||
|
|
||||||
|
app = self.app
|
||||||
|
for filename in os.listdir(app.path + "/conf") if os.path.exists(app.path + "/conf") else []:
|
||||||
|
if not filename.endswith(".src"):
|
||||||
|
continue
|
||||||
|
|
||||||
|
try:
|
||||||
|
content = open(app.path + "/conf/" + filename).read()
|
||||||
|
except Exception as e:
|
||||||
|
yield Warning("Can't open/read %s : %s" % (filename, e))
|
||||||
|
return
|
||||||
|
|
||||||
|
if "SOURCE_SUM_PRG=md5sum" in content:
|
||||||
|
yield Info("%s: Using md5sum checksum is not so great for "
|
||||||
|
"security. Consider using sha256sum instead." % filename)
|
||||||
|
|
||||||
|
|
||||||
@test()
|
@test()
|
||||||
def systemd_config_specific_user(self):
|
def systemd_config_specific_user(self):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue