Skip to content

Commit 929ff03

Browse files
authored
Schedule metadata import jobs after index imports (#963)
* Schedule metadata import jobs after index imports * re-generate freeze file and update hsec tooling * Use NodeJS 20 * Use FreeBSD 14.3 on Cirrus CI * Update Haskell dependencies * Update test fixtures for Hackage packages and advisory tests
1 parent e39c0a9 commit 929ff03

File tree

15 files changed

+80
-61
lines changed

15 files changed

+80
-61
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
freebsd_instance:
2-
image_family: freebsd-14-2
2+
image_family: freebsd-14-3
33

44
task:
5-
name: "Backend build on FreeBSD 14.2"
5+
name: "Backend build on FreeBSD 14.3"
66
env:
77
GHCUP_VERSION: 0.1.50.2
88
CABAL_PROJECT: cabal.project

.github/workflows/backend.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ jobs:
7272
cabal update
7373
mkdir -p ~/.local/share
7474
git clone https://github.com/haskell/security-advisories.git ~/.local/share/security-advisories
75-
cd ~/.local/share/security-advisories
76-
git checkout df64e86a39668c057031fe7e2c679b1003090e03
77-
cd -
7875
7976
- name: "Create freeze file"
8077
run: |

.github/workflows/frontend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
- uses: actions/setup-node@v6
1515
with:
16-
node-version: "18"
16+
node-version: "20"
1717
cache: "yarn"
1818
cache-dependency-path: assets/yarn.lock
1919

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ RUN ghcup install ghc $GHC_VERSION
9999
RUN ghcup set ghc $GHC_VERSION
100100

101101
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
102-
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
102+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
103103
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
104104
RUN apt update
105105
RUN apt install -y direnv \

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ docker-build: ## Build and start the container cluster
158158
@docker compose build devel
159159

160160
docker-up: ## Start the container cluster
161-
@docker compose up -d
161+
@docker compose up -d --build
162162

163163
docker-stop: ## Stop the container cluster without removing the containers
164164
@docker compose stop

cabal.project

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,6 @@ package warp
3232
package zlib
3333
flags: -pkg-config
3434

35-
source-repository-package
36-
type: git
37-
location: https://github.com/haskell/security-advisories/
38-
tag: 0452a2180f3c6d3e7875d2f391136ef92c8eab69
39-
subdir:
40-
./code/cvss
41-
./code/osv
42-
./code/hsec-core
43-
./code/hsec-sync
44-
./code/hsec-tools
45-
4635
source-repository-package
4736
type: git
4837
location: https://github.com/scrive/tracing

cabal.project.freeze

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ constraints: any.Cabal ==3.12.1.0,
77
JuicyPixels -mmap,
88
any.OneTuple ==0.4.2,
99
any.Only ==0.1,
10-
any.PyF ==0.11.4.0,
10+
any.PyF ==0.11.5.0,
1111
any.QuickCheck ==2.15.0.1,
1212
QuickCheck -old-random +templatehaskell,
1313
any.RSA ==2.4.1,
@@ -22,7 +22,7 @@ constraints: any.Cabal ==3.12.1.0,
2222
any.aeson-pretty ==0.8.10,
2323
aeson-pretty -lib-only,
2424
any.alex ==3.5.4.0,
25-
any.ansi-terminal ==1.1.3,
25+
any.ansi-terminal ==1.1.4,
2626
ansi-terminal -example,
2727
any.ansi-terminal-types ==1.1.3,
2828
any.appar ==0.1.8,
@@ -67,14 +67,14 @@ constraints: any.Cabal ==3.12.1.0,
6767
any.boring ==0.2.2,
6868
boring +tagged,
6969
any.bsb-http-chunked ==0.0.0.4,
70-
any.bytebuild ==0.3.16.3,
70+
any.bytebuild ==0.3.17.0,
7171
bytebuild -checked,
7272
any.byteorder ==1.0.4,
7373
any.byteslice ==0.2.15.0,
7474
byteslice +avoid-rawmemchr,
75-
any.bytesmith ==0.3.13.0,
75+
any.bytesmith ==0.3.14.0,
7676
any.bytestring ==0.12.2.0,
77-
any.cabal-doctest ==1.0.11,
77+
any.cabal-doctest ==1.0.12,
7878
any.call-stack ==0.4.0,
7979
any.case-insensitive ==1.2.1.0,
8080
any.cassava ==0.5.4.1,
@@ -121,7 +121,7 @@ constraints: any.Cabal ==3.12.1.0,
121121
crypton -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq +support_pclmuldq +support_rdrand -support_sse +use_target_attributes,
122122
any.crypton-connection ==0.3.2,
123123
any.crypton-x509 ==1.7.7,
124-
any.crypton-x509-store ==1.6.11,
124+
any.crypton-x509-store ==1.6.12,
125125
any.crypton-x509-system ==1.6.7,
126126
any.crypton-x509-validation ==1.6.14,
127127
any.cvss ==0.2.0.1,
@@ -144,7 +144,7 @@ constraints: any.Cabal ==3.12.1.0,
144144
directory-ospath-streaming +os-string,
145145
any.distributive ==0.6.2.1,
146146
distributive +semigroups +tagged,
147-
any.djot ==0.1.2.3,
147+
any.djot ==0.1.2.4,
148148
any.dlist ==1.0,
149149
dlist -werror,
150150
any.doclayout ==0.5.0.1,
@@ -164,7 +164,7 @@ constraints: any.Cabal ==3.12.1.0,
164164
any.eventlog-socket ==0.1.0.0,
165165
any.exceptions ==0.10.9,
166166
any.extensible-exceptions ==0.1.1.4,
167-
any.extra ==1.8,
167+
any.extra ==1.8.1,
168168
any.fast-logger ==3.2.6,
169169
any.feed ==1.3.2.1,
170170
any.file-embed ==0.0.16.0,
@@ -202,19 +202,18 @@ constraints: any.Cabal ==3.12.1.0,
202202
any.hdaemonize ==0.5.7,
203203
any.heaps ==0.4.1,
204204
any.hedgehog ==1.7,
205-
any.heptapod ==1.1.0.0,
205+
any.heptapod ==1.1.0.1,
206206
heptapod -pedantic,
207207
any.hostname ==1.0,
208208
any.hourglass ==0.2.12,
209209
any.hpc ==0.7.0.2,
210210
any.hsc2hs ==0.68.10,
211211
hsc2hs -in-ghc-tree,
212-
any.hsec-core ==0.2.1.0,
213-
any.hsec-sync ==0.2.0.2,
214-
any.hsec-tools ==0.3.0.0,
215-
any.hspec ==2.11.14,
216-
any.hspec-core ==2.11.14,
217-
any.hspec-discover ==2.11.14,
212+
any.hsec-core ==0.3.0.0,
213+
any.hsec-tools ==0.3.0.1,
214+
any.hspec ==2.11.16,
215+
any.hspec-core ==2.11.16,
216+
any.hspec-discover ==2.11.16,
218217
any.hspec-expectations ==0.8.4,
219218
any.hsyslog ==5.0.2,
220219
hsyslog -install-examples,
@@ -229,9 +228,9 @@ constraints: any.Cabal ==3.12.1.0,
229228
http-conduit +aeson,
230229
any.http-date ==0.0.11,
231230
any.http-media ==0.8.1.1,
232-
any.http-semantics ==0.3.0,
231+
any.http-semantics ==0.4.0,
233232
any.http-types ==0.12.4,
234-
any.http2 ==5.3.10,
233+
any.http2 ==5.4.0,
235234
http2 -devel -h2spec,
236235
any.indexed-profunctors ==0.1.1.1,
237236
any.indexed-traversable ==0.1.4,
@@ -250,7 +249,6 @@ constraints: any.Cabal ==3.12.1.0,
250249
any.kan-extensions ==5.2.7,
251250
any.lens ==5.3.5,
252251
lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy,
253-
any.lens-aeson ==1.2.3,
254252
any.libsodium-bindings ==0.0.3.0,
255253
libsodium-bindings -homebrew -pkg-config,
256254
any.libyaml ==0.1.4,
@@ -319,7 +317,6 @@ constraints: any.Cabal ==3.12.1.0,
319317
parser-combinators -dev,
320318
any.parsers ==0.12.12,
321319
parsers +attoparsec +binary +parsec,
322-
any.pathwalk ==0.3.1.2,
323320
any.pcre2 ==2.2.2,
324321
any.pem ==0.2.4,
325322
any.pg-entity ==0.0.6.0,
@@ -423,22 +420,22 @@ constraints: any.Cabal ==3.12.1.0,
423420
splitmix -optimised-mixer,
424421
any.stm ==2.5.3.1,
425422
any.stm-chans ==3.0.0.9,
426-
any.streaming-commons ==0.2.3.0,
423+
any.streaming-commons ==0.2.3.1,
427424
streaming-commons -use-bytestring-builder,
428425
any.streamly ==0.11.0,
429-
streamly -debug -dev -fusion-plugin -has-llvm -inspection -limit-build-mem +opt -use-unliftio,
426+
streamly -debug -fusion-plugin -has-llvm -inspection -internal-dev -internal-use-unliftio -limit-build-mem +opt,
430427
any.streamly-core ==0.3.0,
431-
streamly-core -debug -dev -force-lstat-readdir -has-llvm -limit-build-mem +opt -use-folds -use-unfolds -use-unliftio,
428+
streamly-core -debug -force-lstat-readdir -has-llvm -internal-dev -internal-use-unliftio -limit-build-mem +opt -use-folds -use-unfolds,
432429
any.strict ==0.5.1,
433430
any.strict-mutable-base ==1.1.0.0,
434431
any.string-conv ==0.2.0,
435432
string-conv -lib-werror,
436433
any.string-conversions ==0.4.0.1,
437434
any.syb ==0.7.3,
438-
any.tagged ==0.8.9,
439-
tagged +deepseq +transformers,
435+
any.tagged ==0.8.10,
436+
tagged +deepseq +template-haskell,
440437
any.tagsoup ==0.14.8,
441-
any.tar ==0.6.4.0,
438+
any.tar ==0.7.0.0,
442439
any.tasty ==1.5.3,
443440
tasty +unix,
444441
any.tasty-hunit ==0.10.2,
@@ -456,7 +453,6 @@ constraints: any.Cabal ==3.12.1.0,
456453
any.text-manipulate ==0.3.1.0,
457454
any.text-short ==0.1.6,
458455
text-short -asserts,
459-
any.tf-random ==0.5,
460456
any.th-abstraction ==0.7.1.0,
461457
any.th-compat ==0.1.6,
462458
any.th-expand-syns ==0.4.12.0,
@@ -470,7 +466,7 @@ constraints: any.Cabal ==3.12.1.0,
470466
any.time-compat ==1.9.8,
471467
any.time-locale-compat ==0.1.1.5,
472468
time-locale-compat -old-locale,
473-
any.time-manager ==0.2.3,
469+
any.time-manager ==0.2.4,
474470
any.timerep ==2.1.0.0,
475471
any.timing-convenience ==0.1,
476472
any.tls ==2.0.6,
@@ -492,7 +488,7 @@ constraints: any.Cabal ==3.12.1.0,
492488
any.typst-symbols ==0.1.8.1,
493489
any.unicode-collation ==0.1.3.6,
494490
unicode-collation -doctests -executable,
495-
any.unicode-data ==0.6.0,
491+
any.unicode-data ==0.8.0,
496492
unicode-data -dev-has-icu,
497493
any.unicode-transforms ==0.4.0.1,
498494
unicode-transforms -bench-show -dev -has-icu -has-llvm -use-gauge,
@@ -504,7 +500,7 @@ constraints: any.Cabal ==3.12.1.0,
504500
any.unlifted ==0.2.3.0,
505501
any.unliftio ==0.2.25.1,
506502
any.unliftio-core ==0.2.1.0,
507-
any.unordered-containers ==0.2.20.1,
503+
any.unordered-containers ==0.2.21,
508504
unordered-containers -debug,
509505
any.uri-bytestring ==0.4.0.1,
510506
uri-bytestring -lib-werror,
@@ -519,7 +515,7 @@ constraints: any.Cabal ==3.12.1.0,
519515
any.vector-algorithms ==0.9.1.0,
520516
vector-algorithms +bench +boundschecks -internalchecks -llvm -unsafechecks,
521517
any.vector-stream ==0.1.0.1,
522-
any.void ==0.7.3,
518+
any.void ==0.7.4,
523519
void -safe,
524520
any.wai ==3.2.4,
525521
any.wai-app-static ==3.1.9,
@@ -530,16 +526,14 @@ constraints: any.Cabal ==3.12.1.0,
530526
any.wai-logger ==2.5.0,
531527
any.wai-middleware-heartbeat ==0.0.1.0,
532528
any.wai-middleware-prometheus ==1.0.1.0,
533-
any.warp ==3.4.9,
529+
any.warp ==3.4.11,
534530
warp +allow-sendfilefd +include-warp-version -network-bytestring -warp-debug -x509,
535531
any.wide-word ==0.1.8.1,
536532
any.witherable ==0.5,
537533
any.wl-pprint-annotated ==0.1.0.1,
538534
any.word8 ==0.1.3,
539-
any.wreq ==0.5.4.3,
540-
wreq -aws -developer +doctest -httpbin,
541535
any.xml ==1.3.14,
542-
any.xml-conduit ==1.10.0.1,
536+
any.xml-conduit ==1.10.1.0,
543537
any.xml-types ==0.3.8,
544538
any.yaml ==0.11.11.2,
545539
yaml +no-examples +no-exe,
@@ -548,4 +542,4 @@ constraints: any.Cabal ==3.12.1.0,
548542
zip-archive -executable,
549543
any.zlib ==0.7.1.1,
550544
zlib -bundled-c-zlib +non-blocking-ffi -pkg-config
551-
index-state: hackage.haskell.org 2025-10-21T14:26:30Z
545+
index-state: hackage.haskell.org 2025-12-14T18:03:17Z

flora.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ library flora-jobs
489489
build-depends:
490490
Cabal-syntax,
491491
aeson,
492+
async,
492493
base,
493494
bytestring,
494495
commonmark,

src/advisories/Advisories/Import.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Data.Foldable (forM_, traverse_)
55
import Data.Function ((&))
66
import Data.List.NonEmpty (NonEmpty)
77
import Data.List.NonEmpty qualified as NonEmpty
8+
import Data.Text qualified as Text
89
import Data.Text.Display
910
import Data.UUID.V4 qualified as UUID
1011
import Data.Vector (Vector)
@@ -115,7 +116,7 @@ processAffectedPackage advisoryId affected = do
115116
affectedPackageId <- AffectedPackageId <$> liftIO UUID.nextRandom
116117
let packageName =
117118
case affected.affectedComponentIdentifier of
118-
Hackage affectedPackageName -> PackageName affectedPackageName
119+
Repository _ ((RepositoryName "hackage")) affectedPackageName -> PackageName (Text.pack . unPackageName $ affectedPackageName)
119120
GHC _ -> PackageName "ghc"
120121
let namespace = Namespace "hackage"
121122
package <- guardThatPackageExists namespace packageName $ \_ _ -> do

src/advisories/Advisories/Model/Affected/Types.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Database.PostgreSQL.Simple.ToField
1414
import Distribution.Types.Version
1515
import Distribution.Types.VersionRange (VersionRange)
1616
import GHC.Generics
17-
import Security.Advisories.Core.Advisory
17+
import Security.Advisories.Core.Advisory (Architecture, OS)
1818
import Security.Advisories.Core.HsecId
1919
import Security.CVSS (CVSS)
2020

0 commit comments

Comments
 (0)