Skip to content

Commit

Permalink
Fix bandit error
Browse files Browse the repository at this point in the history
  • Loading branch information
endast committed Nov 14, 2023
1 parent 8a2e26c commit c311944
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions tests/test_example/test_vcf_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,22 @@

def vcf_validator():
vcf_validator_path = test_file_parent / "../../vcf_validator/vcf_validator"
base_url = "https://github.com/EBIvariation/vcf-validator/releases/download/v0.9.4"
dl_urls = {
"Linux": f"{base_url}/vcf_validator_linux",
"Darwin": f"{base_url}/vcf_validator_macos",
"Windows": f"{base_url}/vcf_validator.exe",
}
system_platform = platform.system()
if not vcf_validator_path.exists():
urlretrieve(dl_urls[system_platform], vcf_validator_path)
base_url = (
"https://github.com/EBIvariation/vcf-validator/releases/download/v0.9.4"
)

dl_urls = {
"Linux": f"vcf_validator_linux",
"Darwin": f"vcf_validator_macos",
"Windows": f"vcf_validator.exe",
}
vcf_validiator_dl_url = f"{base_url}/{dl_urls[system_platform]}"

urlretrieve(
vcf_validiator_dl_url, vcf_validator_path
) # nosec CWE-22 should not be a problem
vcf_validator_path.chmod(vcf_validator_path.stat().st_mode | stat.S_IEXEC)

return vcf_validator_path
Expand Down

0 comments on commit c311944

Please sign in to comment.