Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions code/hsec-sync/hsec-sync.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -90,8 +83,6 @@ test-suite spec
, tasty <2
, tasty-hunit <0.11
, temporary >=1 && <2
, text
, time

default-language: Haskell2010
ghc-options:
Expand Down
4 changes: 1 addition & 3 deletions code/hsec-tools/hsec-tools.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -148,7 +147,6 @@ test-suite spec
, tasty <2
, tasty-golden <2.4
, tasty-hedgehog <2
, tasty-hunit <0.11
, text
, time
, toml-parser
Expand Down
13 changes: 11 additions & 2 deletions code/hsec-tools/src/Security/Advisories/Convert/OSV.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 1 addition & 3 deletions code/osv/osv.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading