From 01d28b188600db6c6523c378000a0e341da0f397 Mon Sep 17 00:00:00 2001 From: Talesh Seeparsan Date: Wed, 24 Jul 2024 11:15:38 -0700 Subject: [PATCH] Markdown to PDF workflow automation (#391) * added pdf workflow automation and headers for 5 languages * added markdown to pdf folder --- .github/workflows/markdown-to-pdf.yml | 63 +++++++ .../translations/de/LLM00_Introduction.md | 20 +- .../translations/hi/LLM00_Introduction.md | 19 +- .../translations/it/LLM00_Introduction.md | 18 ++ .../translations/pt/LLM00_Introduction.md | 1 - .../translations/zh/LLM00_Introduction.md | 18 ++ markdown-to-pdf/README.md | 91 +++++++++ markdown-to-pdf/frontmatter.md | 99 ++++++++++ markdown-to-pdf/generated/.gitkeep | 0 markdown-to-pdf/img/OWASP-title-logo.svg | 3 + markdown-to-pdf/img/diagram.png | Bin 0 -> 229754 bytes markdown-to-pdf/img/header-background.png | Bin 0 -> 17467 bytes markdown-to-pdf/img/logo.png | Bin 0 -> 22504 bytes markdown-to-pdf/img/title-background.png | Bin 0 -> 26128 bytes markdown-to-pdf/markdown_to_pdf.sh | 109 +++++++++++ markdown-to-pdf/styles/base.css | 169 +++++++++++++++++ markdown-to-pdf/styles/topten-de.css | 169 +++++++++++++++++ markdown-to-pdf/styles/topten-hi.css | 170 +++++++++++++++++ markdown-to-pdf/styles/topten-it.css | 169 +++++++++++++++++ markdown-to-pdf/styles/topten-ja.css | 172 ++++++++++++++++++ markdown-to-pdf/styles/topten-pt.css | 169 +++++++++++++++++ markdown-to-pdf/styles/topten-zh.css | 172 ++++++++++++++++++ 22 files changed, 1628 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/markdown-to-pdf.yml create mode 100644 markdown-to-pdf/README.md create mode 100644 markdown-to-pdf/frontmatter.md create mode 100644 markdown-to-pdf/generated/.gitkeep create mode 100644 markdown-to-pdf/img/OWASP-title-logo.svg create mode 100644 markdown-to-pdf/img/diagram.png create mode 100644 markdown-to-pdf/img/header-background.png create mode 100644 markdown-to-pdf/img/logo.png create mode 100644 markdown-to-pdf/img/title-background.png create mode 100755 markdown-to-pdf/markdown_to_pdf.sh create mode 100644 markdown-to-pdf/styles/base.css create mode 100644 markdown-to-pdf/styles/topten-de.css create mode 100644 markdown-to-pdf/styles/topten-hi.css create mode 100644 markdown-to-pdf/styles/topten-it.css create mode 100644 markdown-to-pdf/styles/topten-ja.css create mode 100644 markdown-to-pdf/styles/topten-pt.css create mode 100644 markdown-to-pdf/styles/topten-zh.css diff --git a/.github/workflows/markdown-to-pdf.yml b/.github/workflows/markdown-to-pdf.yml new file mode 100644 index 00000000..d5a2914a --- /dev/null +++ b/.github/workflows/markdown-to-pdf.yml @@ -0,0 +1,63 @@ +## Code + +name: Markdown to PDF + +on: + push: + branches: + - main + paths: + - '1_1_vulns/translations/**' + pull_request: + branches: + - main + paths: + - '1_1_vulns/translations/**' + +env: + LANGUAGES: '["de", "it", "pt", "hi", "zh"]' # Add or remove language codes as needed + +jobs: + convert-markdown-to-pdf: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' # Using Node.js version 20 + + - name: Configure locale + run: | + sudo locale-gen en_US.UTF-8 + echo "LC_ALL=en_US.UTF-8" >> $GITHUB_ENV + echo "LANG=en_US.UTF-8" >> $GITHUB_ENV + echo "LANGUAGE=en_US.UTF-8" >> $GITHUB_ENV + + - name: Install necessary fonts + run: | + sudo apt-get update + sudo apt-get install -y fonts-noto fonts-noto-cjk fonts-noto-color-emoji fonts-indic fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core + + - name: Install md-to-pdf + run: npm install -g md-to-pdf + + - name: Run markdown_to_pdf.sh for each language + run: | + for lang in $(echo $LANGUAGES | jq -r '.[]'); do + ./markdown_to_pdf.sh --language $lang + done + working-directory: ./markdown-to-pdf + + - name: Get current date and time + id: date + run: echo "date=$(date '+%Y-%m-%d-%H-%M-%S')" >> $GITHUB_ENV + + - name: Upload generated PDFs as artifact + uses: actions/upload-artifact@v4 + with: + name: pdf-translations-zipfile-${{ env.date }} + path: ./markdown-to-pdf/generated/*.pdf diff --git a/1_1_vulns/translations/de/LLM00_Introduction.md b/1_1_vulns/translations/de/LLM00_Introduction.md index a366ecf4..57c1972f 100644 --- a/1_1_vulns/translations/de/LLM00_Introduction.md +++ b/1_1_vulns/translations/de/LLM00_Introduction.md @@ -1,3 +1,21 @@ +
+ +
+ OWASP Top 10 für LLM-Applikationen +
+
+ VERSION 1.1 +
+
+ Veröffentlicht am: 10. Juni 2024 +
+ +
+ ## Einleitung ### Die Entstehung der Liste @@ -95,4 +113,4 @@ Dieses Diagramm kann als visueller Leitfaden verwendet werden, um zu verstehen, ![Abb_1](images/fig_5_2.jpg) -##### Abbildung 1: OWASP Top 10 für LLM-Applikationen visualisiert \ No newline at end of file +##### Abbildung 1: OWASP Top 10 für LLM-Applikationen visualisiert diff --git a/1_1_vulns/translations/hi/LLM00_Introduction.md b/1_1_vulns/translations/hi/LLM00_Introduction.md index 983a40e6..f089d35a 100644 --- a/1_1_vulns/translations/hi/LLM00_Introduction.md +++ b/1_1_vulns/translations/hi/LLM00_Introduction.md @@ -1,4 +1,21 @@ - +
+ +
+ OWASP टॉप 10 फॉर LLM एप्लिकेशंस +
+
+ संस्करण 1.1 +
+
+ प्रकाशित: 16 अक्टूबर, 2023 +
+ +
+ ## परिचय ### सूची की उत्पत्ति diff --git a/1_1_vulns/translations/it/LLM00_Introduction.md b/1_1_vulns/translations/it/LLM00_Introduction.md index 86f47ccd..0353bc27 100644 --- a/1_1_vulns/translations/it/LLM00_Introduction.md +++ b/1_1_vulns/translations/it/LLM00_Introduction.md @@ -1,3 +1,21 @@ +
+ +
+ OWASP Top 10 per le applicazioni LLM +
+
+ Versione 1.1 +
+
+ Pubblicato: 16 Ottobre 2023 +
+ +
+ ## Introduzione L'introduzione sul mercato di massa dei chatbot pre-addestrati a fine 2022 ha innescato un'ondata di frenetico interesse per i modelli di linguaggio a grandi dimensioni (LLM). Le aziende, desiderose di sfruttare il potenziale degli LLM, li stanno integrando rapidamente nei loro sistemi e nelle offerte destinate ai clienti. Tuttavia, la velocità con cui gli LLM vengono adottati ha superato il tempo necessario per stabilire protocolli di sicurezza esaustivi, lasciando molte applicazioni vulnerabili a seri problemi di sicurezza. diff --git a/1_1_vulns/translations/pt/LLM00_Introduction.md b/1_1_vulns/translations/pt/LLM00_Introduction.md index fbf04201..e8c91b55 100644 --- a/1_1_vulns/translations/pt/LLM00_Introduction.md +++ b/1_1_vulns/translations/pt/LLM00_Introduction.md @@ -1,4 +1,3 @@ -