From 22b9969d1ac3cff45031eb1b6b124aefb9e382c5 Mon Sep 17 00:00:00 2001 From: nacho Date: Sat, 25 Nov 2023 21:09:20 +0100 Subject: [PATCH 1/5] add Earthfile --- lists/disposable-email/Earthfile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lists/disposable-email/Earthfile diff --git a/lists/disposable-email/Earthfile b/lists/disposable-email/Earthfile new file mode 100644 index 0000000..0f51440 --- /dev/null +++ b/lists/disposable-email/Earthfile @@ -0,0 +1,5 @@ +VERSION 0.7 + +export: + COPY list.json ./ + SAVE ARTIFACT list.json \ No newline at end of file From 1aa0b5f62d90e6ca5eb7b44630f7781219203603 Mon Sep 17 00:00:00 2001 From: nacho Date: Sat, 25 Nov 2023 21:15:36 +0100 Subject: [PATCH 2/5] add FROM --- lists/disposable-email/Earthfile | 1 + 1 file changed, 1 insertion(+) diff --git a/lists/disposable-email/Earthfile b/lists/disposable-email/Earthfile index 0f51440..78196c3 100644 --- a/lists/disposable-email/Earthfile +++ b/lists/disposable-email/Earthfile @@ -1,4 +1,5 @@ VERSION 0.7 +FROM alpine:3.18.4 export: COPY list.json ./ From 5352aa0ebc1730e699fc57acfa0911259098a482 Mon Sep 17 00:00:00 2001 From: nacho Date: Sun, 26 Nov 2023 19:30:19 +0100 Subject: [PATCH 3/5] move Earthfile to root folder --- Earthfile | 6 ++++++ lists/disposable-email/Earthfile | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 Earthfile delete mode 100644 lists/disposable-email/Earthfile diff --git a/Earthfile b/Earthfile new file mode 100644 index 0000000..ca4ba84 --- /dev/null +++ b/Earthfile @@ -0,0 +1,6 @@ +VERSION 0.7 +FROM alpine:3.18.4 + +export-lists: + COPY --dir lists ./ + SAVE ARTIFACT lists diff --git a/lists/disposable-email/Earthfile b/lists/disposable-email/Earthfile deleted file mode 100644 index 78196c3..0000000 --- a/lists/disposable-email/Earthfile +++ /dev/null @@ -1,6 +0,0 @@ -VERSION 0.7 -FROM alpine:3.18.4 - -export: - COPY list.json ./ - SAVE ARTIFACT list.json \ No newline at end of file From 06981a0b4f159cb3644c5e19586f77e4f4fa7ba8 Mon Sep 17 00:00:00 2001 From: nacho Date: Sun, 26 Nov 2023 19:30:41 +0100 Subject: [PATCH 4/5] Add Earthly documentation --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 76fa71c..d4a667f 100755 --- a/README.md +++ b/README.md @@ -133,6 +133,13 @@ If matching_attributes are not set, the list is matched against any type of attr See [PyMISPWarningLists](https://github.com/MISP/PyMISPWarningLists) for a python interface to warning lists. +# Using warning lists in Earthly builds + +Lists are exposed to Earthly builds through the target `export-lists`. Earthfiles can directly reference them in their copy statements as follows: +```earthly +COPY github.com/MISP/misp-warninglists[:commit]+export-lists/lists//list.json ./ +``` + # License MISP warning-lists are licensed under [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) - Public Domain Dedication. If a specific author of a warning-list (or associated source) wants to license it under a different license, a pull request can be requested. From fb23389be4669f669e16a1c7843bd0ee6cc73ca2 Mon Sep 17 00:00:00 2001 From: nacho Date: Sun, 26 Nov 2023 19:31:56 +0100 Subject: [PATCH 5/5] Add link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4a667f..afdab82 100755 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ python interface to warning lists. # Using warning lists in Earthly builds -Lists are exposed to Earthly builds through the target `export-lists`. Earthfiles can directly reference them in their copy statements as follows: +Lists are exposed to [Earthly](https://github.com/earthly/earthly) builds through the target `export-lists`. Earthfiles can directly reference them in their copy statements as follows: ```earthly COPY github.com/MISP/misp-warninglists[:commit]+export-lists/lists//list.json ./ ```