From 5c26ef453b68b906946129d107555d0e62912cb5 Mon Sep 17 00:00:00 2001 From: auroranavas Date: Thu, 5 Feb 2026 20:27:23 +0100 Subject: [PATCH 1/4] docs: depricate compiling --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8fd654d..9c0d160 100644 --- a/README.md +++ b/README.md @@ -8,16 +8,10 @@ This project structure is optimized for modern MAL development workflows, which ## 🛠️ Tooling and Compilation -All necessary tools for compiling, analyzing, and working with MAL languages are centralized in the MAL ecosystem. +All necessary tools for working with MAL languages are centralized in the MAL ecosystem. ### MAL Toolbox For all development, compilation, and integration with analysis environments (such as Python), please refer to the main repository: -* **MAL Toolbox Repository:** [https://github.com/mal-lang/mal-toolbox](https://github.com/mal-lang/mal-toolbox) - -### Compiling Your Language - -A detailed, step-by-step tutorial on how to compile a MAL language specification is available here: - -* **Compilation Tutorial:** [https://github.com/mal-lang/mal-toolbox-tutorial?tab=readme-ov-file#compiling-a-language](https://github.com/mal-lang/mal-toolbox-tutorial?tab=readme-ov-file#compiling-a-language) +* **MAL Toolbox Repository:** [https://github.com/mal-lang/mal-toolbox](https://github.com/mal-lang/mal-toolbox) \ No newline at end of file From 3a017e4ca2e9af05c46168d5869c88446b6bfdb6 Mon Sep 17 00:00:00 2001 From: auroranavas Date: Tue, 24 Feb 2026 18:14:19 +0100 Subject: [PATCH 2/4] feat: update to include defense steps --- NOTICE | 15 +-- src/main/mal/exampleLang.mal | 97 +++++++++---------- .../icons/{Password.svg => Credentials.svg} | 0 .../resources/icons/{Host.svg => Machine.svg} | 0 src/main/resources/icons/User.svg | 1 - 5 files changed, 49 insertions(+), 64 deletions(-) rename src/main/resources/icons/{Password.svg => Credentials.svg} (100%) rename src/main/resources/icons/{Host.svg => Machine.svg} (100%) delete mode 100644 src/main/resources/icons/User.svg diff --git a/NOTICE b/NOTICE index 589c0f3..aa5d99e 100644 --- a/NOTICE +++ b/NOTICE @@ -9,7 +9,7 @@ Licensed under the Apache License, Version 2.0 . ================================================================================ -== Host.svg == +== Machine.svg == ================================================================================ "Computer" icon @@ -27,19 +27,10 @@ from the Noun Project is licensed under CC BY 3.0 . ================================================================================ -== Password.svg == +== Credentials.svg == ================================================================================ "Lock" icon by ✦ Shmidt Sergey ✦ from the Noun Project -is licensed under CC BY 3.0 . - -================================================================================ -== User.svg == -================================================================================ - -"User" icon -by ✦ Shmidt Sergey ✦ -from the Noun Project -is licensed under CC BY 3.0 . +is licensed under CC BY 3.0 . \ No newline at end of file diff --git a/src/main/mal/exampleLang.mal b/src/main/mal/exampleLang.mal index 9342ab4..719b086 100644 --- a/src/main/mal/exampleLang.mal +++ b/src/main/mal/exampleLang.mal @@ -1,54 +1,49 @@ -/* - * Copyright 2020-2022 Foreseeti AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#id: "org.mal-lang.examplelang" -#version: "1.0.0" - -category System { - asset Network { - | access - -> hosts.connect - } - - asset Host { - | connect - -> access - | authenticate - -> access - | guessPassword - -> guessedPassword - | guessedPassword [Exponential(0.02)] - -> authenticate - & access - } - - asset User { - | attemptPhishing - -> phish - | phish [Exponential(0.1)] - -> passwords.obtain - } - - asset Password { - | obtain - -> host.authenticate - } +#id: "exampleLang" +#version: "2.0.0" + +category example { + + asset Machine { + | connect + -> authCompromise + + | authenticate + -> authCompromise + + & authCompromise + -> compromise + + | compromise + -> storesCreds.access, + networks.communicate + } + + asset Credentials { + | access + -> useUnencrypted, + crack + + & useUnencrypted + -> use + + | crack [HardAndCertain] + -> use + + | use + -> authenticates.authenticate + + # encrypted + -> useUnencrypted + } + + asset Network { + | communicate + -> parties.connect + } } associations { - Network [networks] * <-- NetworkAccess --> * [hosts] Host - Host [host] 1 <-- Credentials --> * [passwords] Password - User [user] 1 <-- Credentials --> * [passwords] Password -} + Machine [parties] * <-- Communication --> * [networks] Network + Machine [storedOn] * <-- Storage --> * [storesCreds] Credentials + Machine [authenticates] * <-- Access --> * [authCreds] Credentials +} \ No newline at end of file diff --git a/src/main/resources/icons/Password.svg b/src/main/resources/icons/Credentials.svg similarity index 100% rename from src/main/resources/icons/Password.svg rename to src/main/resources/icons/Credentials.svg diff --git a/src/main/resources/icons/Host.svg b/src/main/resources/icons/Machine.svg similarity index 100% rename from src/main/resources/icons/Host.svg rename to src/main/resources/icons/Machine.svg diff --git a/src/main/resources/icons/User.svg b/src/main/resources/icons/User.svg deleted file mode 100644 index fbf753a..0000000 --- a/src/main/resources/icons/User.svg +++ /dev/null @@ -1 +0,0 @@ - From 12aaf5aebe8fac2df61936fd3f3ff7b9043b0df6 Mon Sep 17 00:00:00 2001 From: auroranavas Date: Tue, 24 Feb 2026 18:17:29 +0100 Subject: [PATCH 3/4] chore: add license --- src/main/mal/exampleLang.mal | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/mal/exampleLang.mal b/src/main/mal/exampleLang.mal index 719b086..bb91a7e 100644 --- a/src/main/mal/exampleLang.mal +++ b/src/main/mal/exampleLang.mal @@ -1,3 +1,19 @@ +/* + * Copyright 2020-2022 Foreseeti AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #id: "exampleLang" #version: "2.0.0" From d3ae529fd52aa4dd3c88a734689bc3208fd9a0c3 Mon Sep 17 00:00:00 2001 From: auroranavas Date: Fri, 27 Feb 2026 12:07:06 +0100 Subject: [PATCH 4/4] feat: change category name and multiplicities of Credentials --- src/main/mal/exampleLang.mal | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/mal/exampleLang.mal b/src/main/mal/exampleLang.mal index bb91a7e..ece13a4 100644 --- a/src/main/mal/exampleLang.mal +++ b/src/main/mal/exampleLang.mal @@ -17,7 +17,7 @@ #id: "exampleLang" #version: "2.0.0" -category example { +category System { asset Machine { | connect @@ -60,6 +60,6 @@ category example { associations { Machine [parties] * <-- Communication --> * [networks] Network - Machine [storedOn] * <-- Storage --> * [storesCreds] Credentials - Machine [authenticates] * <-- Access --> * [authCreds] Credentials + Machine [storedOn] 0..1 <-- Storage --> * [storesCreds] Credentials + Machine [authenticates] 0..1 <-- Access --> * [authCreds] Credentials } \ No newline at end of file