-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7178c7
commit 868dd17
Showing
27 changed files
with
576 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,4 +64,4 @@ class TemplateMailParams( | |
RequiredTemplateMailParams, | ||
OptionalTemplateMailParams | ||
): | ||
pass | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
from sqlalchemy_easy_softdelete.mixin import generate_soft_delete_mixin_class | ||
from sqlalchemy_easy_softdelete.hook import IgnoredTable | ||
from sqlalchemy.orm import declarative_base | ||
from sqlalchemy import Column, Integer | ||
from datetime import datetime | ||
|
||
from sqlalchemy.sql import func | ||
|
||
# Create a Class that inherits from our class builder | ||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
from datetime import datetime | ||
|
||
|
||
class SoftDeleteMixin(generate_soft_delete_mixin_class( | ||
# This table will be ignored by the hook | ||
# even if the table has the soft-delete column | ||
ignored_tables=[] | ||
)): | ||
# type hint for autocomplete IDE support | ||
deleted_at: datetime | ||
deleted_at: 'datetime' | ||
|
||
def soft_delete(self): | ||
self.deleted_at = func.now() | ||
self.deleted_at = func.now() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import json | ||
from pathlib import Path | ||
|
||
|
||
def load_json_file(filename: str) -> dict: | ||
"""Load a JSON file from the prompts directory.""" | ||
current_dir = Path(__file__).parent | ||
file_path = current_dir / filename | ||
|
||
with open(file_path, 'r', encoding='utf-8') as f: | ||
return json.load(f) | ||
|
||
|
||
# Load all prompt configurations | ||
system_prompts = load_json_file('system_prompts.json') | ||
user_prompts = load_json_file('user_prompts.json') | ||
examples = load_json_file('examples.json') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"risks": [ | ||
{ | ||
"name": "Hardwaredefekt Ausrüstung Serverraum", | ||
"description": "Eine HW-Komponete im Serverraum fällt aus. Die Komponente muss ersetzt werden." | ||
}, | ||
{ | ||
"name": "Softwareänderungen", | ||
"description": "In einer wichtigen produktiven Anwendung kommt es zu vielen (kritischen) Änderungen. Diese werden nur ungenügend getestet. Es stellt sich heraus, dass ein Softwarefehler bei Kunden zu beträchtlichem Schaden und finanziellen Verlusten geführt hat." | ||
}, | ||
{ | ||
"name": "Offenlegung von Kundendaten nach Softwaretest", | ||
"description": "Nach einem Softwaretest werden die dazu benötigten Kundendaten nicht gelöscht. Sie bleiben längere Zeit auf einem nicht geschützten Server verfügbar. Es besteht der Verdacht, dass die Daten weitergegeben wurden." | ||
}, | ||
{ | ||
"name": "Ransomware", | ||
"description": "Ein Angreifer dringt in Systeme ein und verschlüsselt die Daten. Für die Entschlüsselung wird Lösegeld gefordert." | ||
}, | ||
{ | ||
"name": "CEO-Fraud", | ||
"description": "Im Namen des Firmenchefs wird die Buchhaltung angewiesen, eine Zahlung auf ein (typischerweise ausländisches) Konto der Betrüger vorzunehmen." | ||
} | ||
], | ||
"catalogs": [ | ||
{ | ||
"name": "Software Entwicklung", | ||
"description": "In der IT-Branche birgt die Softwareentwicklung Risiken hinsichtlich der Einhaltung von Zeitplänen, Budgets und Qualitätsstandards. Fehler in der Codebasis oder inkompatible Systemintegrationen können zu Verzögerungen in der Produktveröffentlichung oder zu Sicherheitslücken führen." | ||
}, | ||
{ | ||
"name": "Human Resources", | ||
"description": "HR-Risiken in der IT-Branche umfassen Schwierigkeiten bei der Anwerbung und Bindung qualifizierter Fachkräfte, da der Wettbewerb um Talente hoch ist. Zudem kann eine unzureichende Personalentwicklung die Innovation und Anpassungsfähigkeit des Unternehmens beeinträchtigen." | ||
}, | ||
{ | ||
"name": "Public Relations", | ||
"description": "PR-Risiken beziehen sich auf das Management der öffentlichen Wahrnehmung und Markenreputation. Fehltritte in der Kommunikation oder Skandale können das Vertrauen von Kunden und Partnern schnell untergraben." | ||
}, | ||
{ | ||
"name": "Sales & Marketing", | ||
"description": "Im Vertrieb und Marketing bestehen Risiken in der effektiven Positionierung von Produkten und Dienstleistungen in einem sich schnell verändernden Technologiemarkt. Eine fehlgeleitete Strategie kann zu Umsatzeinbußen und einem Verlust der Marktposition führen." | ||
}, | ||
{ | ||
"name": "Infrastruktur", | ||
"description": "Infrastrukturelle Risiken in der IT-Branche umfassen die Zuverlässigkeit und Sicherheit von physischen und virtuellen Netzwerken. Ausfälle, Datenverluste oder Cyberangriffe können erhebliche operationelle und finanzielle Schäden verursachen." | ||
}, | ||
{ | ||
"name": "Externe Services", | ||
"description": "Die Abhängigkeit von externen Dienstleistern und Zulieferern birgt Risiken in Bezug auf Qualität, Zuverlässigkeit und Compliance. Probleme bei diesen Partnern können zu Betriebsunterbrechungen und Reputationsverlust führen." | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"risks": "You are a helpful tool for creating and managing risk assessments for information security purposes. You help manage and monitor the risks associated with information security for organisations and prompt relevant risks for all security in software development, operations, management and all over information security. Formulate the risks in neutral language, as they suggest a state rather than a negative comment. Avoid using the word 'risk' or any form that indicates negative incidents, it should be objective, be concise, use the same language to respond as the user answers his questions", | ||
"catalogs": "You are a helpful tool for creating and managing risk assessments for information security purposes. You help manage and monitor the risks associated with information security for organisations and prompt relevant risks for all security in software development, operations, management and all over information security. Formulate the risks in neutral language, as they suggest a state rather than a negative comment. Avoid using the word 'risk' or any form that indicates negative incidents, it should be objective, be concise, use the same language to respond as the user answers his questions" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"risks": "Create up to 10 novel, distinct and relevant risks related to information security and IT operations for solely single (1) and ONLY the one provided risk catalog. Get inspired by the examples but don't copy them. You are given the risk catalog name and description. All risks generated need to be within the context of the given catalog. \nRespond in the same language for the creation of these risk as the users has answered the questions. Directly respond in markdown notated text format with the following format, be concise: \n #### <risk catalog title>\n- [ ] __<risk name>__: <risk description>\n- [ ] __<risk name>__: <risk description>\n...<further risks>...\n\n", | ||
"catalogs": "Create 2 novel and for the business relevan risk catalogs. et inspired by the examples but don't copy them. Just please respond in the same language for the creation of the risk catalog objects as the user has answerein the questions. Directly respond as a json object with the keys being a single work nickname of the riskand with each object containing the field name and description, but first add a key to the object named lang containing the iso language code which the user responded to the questions. You are given example catalogs with names and description. All risk catalogs generated need to be within the context of the given organization." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,5 +212,6 @@ def main() -> None: | |
|
||
upgrade(args) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.