Skip to content
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
04de290
Added the risks sources support.
ruslanbaidan May 8, 2026
8305958
Added the import and export functionality for the rtisk sources.
ruslanbaidan May 11, 2026
2a9e708
Added the reassessment trigger criteria functionality, corrected the …
ruslanbaidan May 12, 2026
7a9554f
Rearrenged the templates' tags to make them more visible.
ruslanbaidan May 13, 2026
0d2f294
Added the monitoring and review, last review date and review frequenc…
ruslanbaidan May 15, 2026
bc4006e
Added the functionality to handle the operational risks related risk …
ruslanbaidan May 21, 2026
5959582
Added the interested parties functionality.
ruslanbaidan May 22, 2026
70e997f
Moved the fields usage from the core to client side.
ruslanbaidan Jun 1, 2026
3b70d1d
Fixed the type hints.
ruslanbaidan Jun 1, 2026
6e28a32
Merge pull request #79 from monarc-project/feature/AB-08
ruslanbaidan Jun 1, 2026
cca8f8c
Replaced usage of Risk Owners to Supervisers with RO role, added the …
ruslanbaidan Jun 12, 2026
3f270a2
Moved the supervisors data save requests to the patch endpoints to av…
ruslanbaidan Jun 15, 2026
ca701af
Added the history of the actions related to the risks, fixed the expo…
ruslanbaidan Jun 16, 2026
55adad8
Fixed the risk owner and decission approver data process, fixed the r…
ruslanbaidan Jun 19, 2026
0a16863
Added the risks management page and the batch operations for the risk…
ruslanbaidan Jun 24, 2026
0fc81b9
FIxed the users creation command to set the proper password.
ruslanbaidan Jun 25, 2026
363b03b
Moved the duplicated export methods to a trait.
ruslanbaidan Jul 6, 2026
d5252e8
Add assigned risk counts for linked supervisors
ruslanbaidan Jul 6, 2026
7659629
Merge remote-tracking branch 'origin/feature/AB-17' into stage
ruslanbaidan Jul 6, 2026
e03ac9e
Added the risks managemen information on the analysis list and inside…
ruslanbaidan Jul 6, 2026
f222d07
Merge remote-tracking branch 'origin/stage' into feature/AB-17
ruslanbaidan Jul 6, 2026
c0a1820
Renamed the residual risk acceptance date to decission date.
ruslanbaidan Jul 6, 2026
a667d5a
Removed the unused properties from the export of the analysis and fix…
ruslanbaidan Jul 20, 2026
13432df
Added the 2 new flags to the anr to 1st and 4th steps as substeps rel…
ruslanbaidan Jul 30, 2026
68837a4
Added the PDF reports gneration possibility.
ruslanbaidan Jul 30, 2026
3b373ef
Merge pull request #81 from monarc-project/feature/pdf-reports
ruslanbaidan Jul 30, 2026
6ebbd24
Added the possibility to link risks to reassessment triggers, added n…
ruslanbaidan Jul 31, 2026
9613a86
Added the analysis reevaluation date and the frequence of the review.
ruslanbaidan Aug 4, 2026
029920e
Added the warnings of the analysis reassesment deadline on the list v…
ruslanbaidan Aug 5, 2026
98d2f36
Added the custom validation classes to avoid mixing up the rules betw…
ruslanbaidan Aug 7, 2026
bfcf314
Added the empty analysis creation.
ruslanbaidan Aug 9, 2026
58f7693
Alligned the languages configuration between BO and FO, UI and data m…
ruslanbaidan Aug 10, 2026
c241ab2
Merge pull request #82 from monarc-project/feature/MON-1
ruslanbaidan Aug 11, 2026
2777de5
Fixed the system user validation cases, and allowed to disable it.
ruslanbaidan Aug 12, 2026
c928e03
Prevented displaying already linked users to the analysis in the supe…
ruslanbaidan Aug 13, 2026
92b791f
Potential fix for pull request finding
ruslanbaidan Aug 14, 2026
d3bf3b4
Potential fix for pull request finding
ruslanbaidan Aug 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@
"laminas/laminas-inputfilter": "^2.10",
"laminas/laminas-dependency-plugin": "^2.0",
"symfony/console": "^5.0",
"guzzlehttp/guzzle": "^6.5",
"guzzlehttp/guzzle": "^7.11",
"phpoffice/phpword": "^0.18.1",
"laminas/laminas-mvc-middleware": "^2.2",
"laminas/laminas-captcha": "^2.18"
"laminas/laminas-captcha": "^2.18",
"guzzlehttp/psr7": "^2.11"
},
"require-dev": {
"roave/security-advisories": "dev-latest"
Expand Down
208 changes: 199 additions & 9 deletions config/module.config.php

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions migrations/db/20260505100000_add_risk_sources.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?php declare(strict_types=1);
/**
* @link https://github.com/monarc-project for the canonical source repository
* @copyright Copyright (c) 2016-2026 Luxembourg House of Cybersecurity LHC.lu - Licensed under GNU Affero GPL v3
* @license MONARC is licensed under GNU Affero General Public License version 3
*/

use Phinx\Migration\AbstractMigration;

class AddRiskSources extends AbstractMigration
{
public function up(): void
{
$this->execute(
'CREATE TABLE `risk_sources` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`anr_id` int(11) unsigned NOT NULL,
`label` varchar(255) NOT NULL,
`is_default` tinyint(1) NOT NULL DEFAULT 0,
`is_active` tinyint(1) NOT NULL DEFAULT 1,
`creator` varchar(255) DEFAULT NULL,
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
`updater` varchar(255) DEFAULT NULL,
`updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `risk_sources_anr_id_indx` (`anr_id`),
KEY `risk_sources_anr_id_is_active_indx` (`anr_id`, `is_active`),
UNIQUE `risk_sources_anr_id_label_unq` (`anr_id`, `label`),
FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci'
);

$anrIds = $this->fetchAll('SELECT id FROM anrs');
foreach ($anrIds as $anr) {
$anrId = $anr['id'];
$this->execute(
"INSERT IGNORE INTO `risk_sources` (`anr_id`, `label`, `is_default`, `is_active`, `creator`, `created_at`) VALUES
({$anrId}, 'External attacker', 1, 1, 'System', NOW()),
({$anrId}, 'Internal malicious user', 1, 1, 'System', NOW()),
({$anrId}, 'Internal accidental user', 1, 1, 'System', NOW()),
({$anrId}, 'Supplier / third party', 1, 1, 'System', NOW()),
({$anrId}, 'System failure', 1, 1, 'System', NOW()),
({$anrId}, 'Software defect', 1, 1, 'System', NOW()),
({$anrId}, 'Natural event', 1, 1, 'System', NOW()),
({$anrId}, 'Organizational or process weakness', 1, 1, 'System', NOW()),
({$anrId}, 'Other', 1, 1, 'System', NOW());"
);
}

$this->table('instances_risks')
->addColumn('risk_source_id', 'integer', ['null' => true, 'signed' => false, 'after' => 'asset_id'])
->addIndex(['risk_source_id'], ['name' => 'risk_source_id'])
->addForeignKey('risk_source_id', 'risk_sources', 'id', ['delete' => 'SET_NULL', 'update' => 'RESTRICT'])
->update();
}

public function down(): void
{
$this->table('instances_risks')
->dropForeignKey('risk_source_id')
->removeIndexByName('risk_source_id')
->removeColumn('risk_source_id')
->update();

$this->table('risk_sources')->drop()->save();
}
}
40 changes: 40 additions & 0 deletions migrations/db/20260511101000_add_anr_reassessment_triggers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php declare(strict_types=1);
/**
* @link https://github.com/monarc-project for the canonical source repository
* @copyright Copyright (c) 2016-2026 Luxembourg House of Cybersecurity LHC.lu - Licensed under GNU Affero GPL v3
* @license MONARC is licensed under GNU Affero General Public License version 3
*/

use Phinx\Migration\AbstractMigration;

class AddAnrReassessmentTriggers extends AbstractMigration
{
public function up(): void
{
$this->execute(
'CREATE TABLE IF NOT EXISTS `anr_reassessment_triggers` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`anr_id` int(11) unsigned NOT NULL,
`trigger_type` varchar(255) DEFAULT "",
`description` text NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT 1,
`position` int(11) NOT NULL DEFAULT 0,
`creator` varchar(255) DEFAULT NULL,
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
`updater` varchar(255) DEFAULT NULL,
`updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `anr_reassessment_triggers_anr_id_indx` (`anr_id`),
KEY `anr_reassessment_triggers_anr_id_trigger_type_indx` (`anr_id`, `trigger_type`),
KEY `anr_reassessment_triggers_anr_id_position_indx` (`anr_id`, `position`),
CONSTRAINT `fk_anr_reassessment_triggers_anr`
FOREIGN KEY (`anr_id`) REFERENCES `anrs` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;'
);
}

public function down(): void
{
$this->table('anr_reassessment_triggers')->drop()->save();
}
}
35 changes: 35 additions & 0 deletions migrations/db/20260515101000_add_risk_review_metadata.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php declare(strict_types=1);
/**
* @link https://github.com/monarc-project for the canonical source repository
* @copyright Copyright (c) 2016-2026 Luxembourg House of Cybersecurity LHC.lu - Licensed under GNU Affero GPL v3
* @license MONARC is licensed under GNU Affero General Public License version 3
*/

use Phinx\Migration\AbstractMigration;

class AddRiskReviewMetadata extends AbstractMigration
{
public function up(): void
{
$this->table('instances_risks')
->addColumn('last_review_date', 'date', ['null' => true, 'after' => 'comment_after'])
->addColumn('review_frequency', 'string', ['limit' => 50, 'null' => true, 'after' => 'last_review_date'])
->update();

$this->table('anr_reassessment_triggers')
->addColumn('monitoring_approach', 'text', ['null' => true, 'after' => 'description'])
->update();
}

public function down(): void
{
$this->table('instances_risks')
->removeColumn('review_frequency')
->removeColumn('last_review_date')
->update();

$this->table('anr_reassessment_triggers')
->removeColumn('monitoring_approach')
->update();
}
}
55 changes: 55 additions & 0 deletions migrations/db/20260519101000_add_residual_risk_acceptance.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php declare(strict_types=1);
/**
* @link https://github.com/monarc-project for the canonical source repository
* @copyright Copyright (c) 2016-2026 Luxembourg House of Cybersecurity LHC.lu - Licensed under GNU Affero GPL v3
* @license MONARC is licensed under GNU Affero General Public License version 3
*/

use Phinx\Migration\AbstractMigration;

class AddResidualRiskAcceptance extends AbstractMigration
{
public function up(): void
{
$this->table('instances_risks')
->addColumn('residual_risk_decision', 'string', ['limit' => 20, 'null' => true, 'after' => 'review_frequency'])
->addColumn('residual_risk_approved_by', 'string', ['limit' => 255, 'null' => true, 'after' => 'residual_risk_decision'])
->addColumn('residual_risk_approved_at', 'date', ['null' => true, 'after' => 'residual_risk_approved_by'])
->addColumn('residual_risk_justification', 'text', ['null' => true, 'after' => 'residual_risk_approved_at'])
->update();

$this->table('instances_risks_op')
->addColumn('last_review_date', 'date', ['null' => true, 'after' => 'mitigation'])
->addColumn('review_frequency', 'string', ['limit' => 50, 'null' => true, 'after' => 'last_review_date'])
->addColumn('residual_risk_decision', 'string', ['limit' => 20, 'null' => true, 'after' => 'review_frequency'])
->addColumn('residual_risk_approved_by', 'string', ['limit' => 255, 'null' => true, 'after' => 'residual_risk_decision'])
->addColumn('residual_risk_approved_at', 'date', ['null' => true, 'after' => 'residual_risk_approved_by'])
->addColumn('residual_risk_justification', 'text', ['null' => true, 'after' => 'residual_risk_approved_at'])
->addColumn('risk_source_id', 'integer', ['null' => true, 'signed' => false, 'after' => 'object_id'])
->addIndex(['risk_source_id'], ['name' => 'risk_source_id'])
->addForeignKey('risk_source_id', 'risk_sources', 'id', ['delete' => 'SET_NULL', 'update' => 'RESTRICT'])
->update();
}

public function down(): void
{
$this->table('instances_risks')
->removeColumn('residual_risk_justification')
->removeColumn('residual_risk_approved_at')
->removeColumn('residual_risk_approved_by')
->removeColumn('residual_risk_decision')
->update();

$this->table('instances_risks_op')
->removeColumn('residual_risk_justification')
->removeColumn('residual_risk_approved_at')
->removeColumn('residual_risk_approved_by')
->removeColumn('residual_risk_decision')
->removeColumn('review_frequency')
->removeColumn('last_review_date')
->dropForeignKey('risk_source_id')
->removeIndexByName('risk_source_id')
->removeColumn('risk_source_id')
->update();
}
}
33 changes: 33 additions & 0 deletions migrations/db/20260522101000_add_interested_parties.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php declare(strict_types=1);
/**
* @link https://github.com/monarc-project for the canonical source repository
* @copyright Copyright (c) 2016-2026 Luxembourg House of Cybersecurity LHC.lu - Licensed under GNU Affero GPL v3
* @license MONARC is licensed under GNU Affero General Public License version 3
*/

use Phinx\Migration\AbstractMigration;

class AddInterestedParties extends AbstractMigration
{
public function up(): void
{
$this->table('anr_interested_parties')
->addColumn('anr_id', 'integer', ['null' => false, 'signed' => false])
->addColumn('stakeholder', 'string', ['limit' => 255, 'null' => false])
->addColumn('requirement', 'text', ['null' => false])
->addColumn('position', 'integer', ['default' => 0, 'signed' => false])
->addColumn('creator', 'string', ['limit' => 255, 'null' => true])
->addColumn('created_at', 'datetime', ['null' => true])
->addColumn('updater', 'string', ['limit' => 255, 'null' => true])
->addColumn('updated_at', 'datetime', ['null' => true])
->addIndex(['anr_id'], ['name' => 'idx_anr_id'])
->addIndex(['anr_id', 'position'], ['name' => 'anr_interested_parties_anr_id_position_indx'])
->addForeignKey('anr_id', 'anrs', 'id', ['delete' => 'CASCADE', 'update' => 'RESTRICT'])
->create();
}

public function down(): void
{
$this->table('anr_interested_parties')->drop()->save();
}
}
Loading
Loading