diff --git a/code/hsec-sync/hsec-sync.cabal b/code/hsec-sync/hsec-sync.cabal index a0a8bde..192c366 100644 --- a/code/hsec-sync/hsec-sync.cabal +++ b/code/hsec-sync/hsec-sync.cabal @@ -30,20 +30,17 @@ library Security.Advisories.Sync.Url build-depends: - , aeson >=2.0 && <3 , base >=4.14 && <5 , bytestring >=0.10 && <0.13 , directory >=1.3 && <1.4 , either >=5.0 && <5.1 , extra >=1.7 && <1.9 , filepath >=1.4 && <1.6 - , hsec-core ^>=0.2 , http-client >=0.7.0 && <0.8 , lens >=5.1 && <5.4 , tar >=0.5 && <0.7 , temporary >=1 && <2 , text >=1.2 && <3 - , time >=1.9 && <1.15 , transformers >=0.5 && <0.7 , wreq >=0.5 && <0.6 , zlib >=0.6 && <0.8 @@ -63,13 +60,9 @@ executable hsec-sync -- LANGUAGE extensions used by modules in this package. -- other-extensions: build-depends: - , aeson >=2.0.1.0 && <3 , base >=4.14 && <5 - , bytestring >=0.10 && <0.13 - , filepath >=1.4 && <1.6 , hsec-sync , optparse-applicative >=0.17 && <0.19 - , text >=1.2 && <3 hs-source-dirs: app default-language: Haskell2010 @@ -90,8 +83,6 @@ test-suite spec , tasty <2 , tasty-hunit <0.11 , temporary >=1 && <2 - , text - , time default-language: Haskell2010 ghc-options: diff --git a/code/hsec-tools/hsec-tools.cabal b/code/hsec-tools/hsec-tools.cabal index b2b5a9c..d87733b 100644 --- a/code/hsec-tools/hsec-tools.cabal +++ b/code/hsec-tools/hsec-tools.cabal @@ -78,7 +78,6 @@ library , process >=1.6 && <1.7 , refined >=0.7 && <0.9 , resourcet >=1.2 && <1.4 - , safe >=0.3 && <0.4 , text >=1.2 && <3 , template-haskell >=2.16.0.0 && <2.24 , time >=1.9 && <1.15 @@ -114,7 +113,7 @@ executable hsec-tools , hsec-tools , optparse-applicative >=0.17 && <0.19 , text >=1.2 && <3 - , transformers + , transformers >=0.5 && <0.7 , validation-selective >=0.1 && <1 hs-source-dirs: app @@ -148,7 +147,6 @@ test-suite spec , tasty <2 , tasty-golden <2.4 , tasty-hedgehog <2 - , tasty-hunit <0.11 , text , time , toml-parser diff --git a/code/hsec-tools/src/Security/Advisories/Convert/OSV.hs b/code/hsec-tools/src/Security/Advisories/Convert/OSV.hs index 691e516..c289f09 100644 --- a/code/hsec-tools/src/Security/Advisories/Convert/OSV.hs +++ b/code/hsec-tools/src/Security/Advisories/Convert/OSV.hs @@ -114,11 +114,20 @@ mkAffectedWithLinks links hsecId aff = { OSV.affectedDatabaseSpecific = Just AffectedLinks - { affectedLinksOSV = stripSlash (dbLinksOSVs links) <> "/" <> T.pack (show $ hsecIdYear hsecId) <> "/" <> T.pack (printHsecId hsecId) <> ".json" - , affectedLinksHumanLink = stripSlash (dbLinksHome links) <> "/tree/main/advisories/published/" <> T.pack (show $ hsecIdYear hsecId) <> "/" <> T.pack (show $ hsecIdSerial hsecId) <> ".md" + { affectedLinksOSV = osvLink + , affectedLinksHumanLink = humanLink } , .. } where OSV.Affected{..} = mkAffected aff stripSlash = T.dropWhileEnd (== '/') + osvLink = + stripSlash (dbLinksOSVs links) + <> "/" <> T.pack (show $ hsecIdYear hsecId) + <> "/" <> T.pack (printHsecId hsecId) <> ".json" + humanLink = + stripSlash (dbLinksHome links) + <> "/tree/main/advisories/published/" + <> T.pack (show $ hsecIdYear hsecId) + <> "/" <> T.pack (printHsecId hsecId) <> ".md" diff --git a/code/osv/osv.cabal b/code/osv/osv.cabal index 95a4368..121f7ba 100644 --- a/code/osv/osv.cabal +++ b/code/osv/osv.cabal @@ -49,10 +49,8 @@ test-suite spec hs-source-dirs: test main-is: Spec.hs build-depends: - , base - , osv + , base >= 4.14 && < 5 , tasty <2 - , tasty-hunit <0.11 default-language: Haskell2010 ghc-options: