-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for Python 3, rewrite, and AS Macs
- Loading branch information
Showing
38 changed files
with
1,067 additions
and
1,516 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
var formatSecurityFirewall = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == '1' ? '<span class="label label-success">'+i18n.t('enabled')+'</span>' : | ||
colvar = colvar == '2' ? '<span class="label label-success">'+i18n.t('security.block_all')+'</span>' : | ||
(colvar === '0' ? '<span class="label label-danger">'+i18n.t('disabled')+'</span>' : colvar) | ||
col.html(colvar) | ||
} | ||
|
||
var formatSecurityFileVaultEncrypted = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == '1' ? '<span class="label label-success">'+i18n.t('encrypted')+'</span>' : | ||
(colvar === '0' ? '<span class="label label-danger">'+i18n.t('unencrypted')+'</span>' : | ||
colvar = '<span class="label label-default">'+i18n.t('unknown')+'</span>') | ||
col.html(colvar) | ||
} | ||
|
||
var formatSecurityGatekeeper = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == 'Active' ? '<span class="label label-success">'+i18n.t('enabled')+'</span>' : | ||
colvar = (colvar == 'Not Supported' ? '<span class="label label-info">'+i18n.t('unsupported')+'</span>' : | ||
colvar = '<span class="label label-danger">'+i18n.t('disabled')+'</span>') | ||
col.html(colvar) | ||
} | ||
|
||
var formatSecurityRootUser = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == '0' ? '<span class="label label-success">'+i18n.t('disabled')+'</span>' : | ||
colvar = (colvar == '1' ? '<span class="label label-danger">'+i18n.t('enabled')+'</span>' : | ||
colvar = '<span class="label label-default">'+i18n.t('unknown')+'</span>') | ||
col.html(colvar) | ||
} | ||
|
||
var formatSecurityFirmwarePW = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == 'Yes' ? '<span class="label label-success">'+i18n.t('enabled')+'</span>' : | ||
colvar = colvar == 'command' ? '<span class="label label-success">'+i18n.t('enabled')+'</span>' : | ||
colvar = colvar == 'No' ? '<span class="label label-danger">'+i18n.t('disabled')+'</span>' : | ||
colvar = (colvar == 'Not Supported' ? '<span class="label label-info">'+i18n.t('unsupported')+'</span>' : | ||
colvar = '<span class="label label-default">'+i18n.t('unknown')+'</span>') | ||
col.html(colvar) | ||
} | ||
|
||
var formatSecuritySKEL = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == '1' ? '<span class="label label-info">'+i18n.t('security.skel.all-approved')+'</span>' : | ||
colvar = (colvar == '0' ? '<span class="label label-info">'+i18n.t('security.skel.user-approved')+'</span>' : | ||
colvar = '<span class="label label-default">'+i18n.t('unknown')+'</span>') | ||
col.html(colvar) | ||
} | ||
|
||
var formatSecuritySecureBoot = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == 'SECUREBOOT_FULL' ? '<span class="label label-success">'+i18n.t('security.full')+'</span>' : | ||
colvar = colvar == 'SECUREBOOT_MEDIUM' ? '<span class="label label-warning">'+i18n.t('security.medium')+'</span>' : | ||
colvar = colvar == 'SECUREBOOT_OFF' ? '<span class="label label-danger">'+i18n.t('security.off')+'</span>' : | ||
colvar = (colvar == 'SECUREBOOT_UNSUPPORTED' ? '<span class="label label-info">'+i18n.t('security.unsupported')+'</span>' : | ||
colvar = '<span class="label label-default">'+i18n.t('unknown')+'</span>') | ||
col.html(colvar) | ||
} | ||
|
||
var formatSecurityExternalBoot = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == 'EXTERNALBOOT_ON' ? '<span class="label label-danger">'+i18n.t('security.on')+'</span>' : | ||
colvar = colvar == 'EXTERNALBOOT_OFF' ? '<span class="label label-success">'+i18n.t('security.off')+'</span>' : | ||
colvar = (colvar == 'EXTERNALBOOT_UNSUPPORTED' ? '<span class="label label-info">'+i18n.t('security.unsupported')+'</span>' : | ||
colvar = '<span class="label label-default">'+i18n.t('unknown')+'</span>') | ||
col.html(colvar) | ||
} | ||
|
||
var formatASSecurityMode = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == 'FULL_SECURITY' ? '<span class="label label-success">'+i18n.t('security.full')+'</span>' : | ||
colvar = colvar == 'REDUCED_SECURITY' ? '<span class="label label-warning">'+i18n.t('security.reduced')+'</span>' : | ||
colvar = colvar == 'PERMISSIVE_SECURITY' ? '<span class="label label-danger">'+i18n.t('security.permissive')+'</span>' : | ||
colvar = (colvar == 'SECURITYMODE_UNSUPPORTED' ? '<span class="label label-info">'+i18n.t('security.unsupported')+'</span>' : | ||
colvar = '<span class="label label-default">'+i18n.t('unknown')+'</span>') | ||
col.html(colvar) | ||
} | ||
|
||
var formatSecurityActivationLock = function(colNumber, row){ | ||
var col = $('td:eq('+colNumber+')', row), | ||
colvar = col.text(); | ||
colvar = colvar == 'activation_lock_enabled' ? '<span class="label label-danger">'+i18n.t('enabled')+'</span>' : | ||
colvar = colvar == 'activation_lock_disabled' ? '<span class="label label-success">'+i18n.t('disabled')+'</span>' : | ||
colvar = (colvar == 'not_supported' ? '<span class="label label-info">'+i18n.t('security.unsupported')+'</span>' : | ||
colvar = '<span class="label label-default">'+i18n.t('unknown')+'</span>') | ||
col.html(colvar) | ||
} |
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
27 changes: 27 additions & 0 deletions
27
migrations/2021_04_13_000001_security_add_activation_lock.php
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,27 @@ | ||
<?php | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Capsule\Manager as Capsule; | ||
|
||
class SecurityAddActivationLock extends Migration | ||
{ | ||
private $tableName = 'security'; | ||
|
||
public function up() | ||
{ | ||
$capsule = new Capsule(); | ||
$capsule::schema()->table($this->tableName, function (Blueprint $table) { | ||
$table->string('activation_lock')->default('')->nullable(); | ||
$table->index('activation_lock'); | ||
|
||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
$capsule = new Capsule(); | ||
$capsule::schema()->table($this->tableName, function (Blueprint $table) { | ||
$table->dropColumn('activation_lock'); | ||
}); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
migrations/2022_08_16_000001_security_add_as_security_mode.php
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,27 @@ | ||
<?php | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Capsule\Manager as Capsule; | ||
|
||
class SecurityAddAsSecurityMode extends Migration | ||
{ | ||
private $tableName = 'security'; | ||
|
||
public function up() | ||
{ | ||
$capsule = new Capsule(); | ||
$capsule::schema()->table($this->tableName, function (Blueprint $table) { | ||
$table->string('as_security_mode')->nullable(); | ||
$table->index('as_security_mode'); | ||
|
||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
$capsule = new Capsule(); | ||
$capsule::schema()->table($this->tableName, function (Blueprint $table) { | ||
$table->dropColumn('as_security_mode'); | ||
}); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
migrations/2023_03_23_000001_security_add_filevault_info.php
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,30 @@ | ||
<?php | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Capsule\Manager as Capsule; | ||
|
||
class SecurityAddFilevaultInfo extends Migration | ||
{ | ||
private $tableName = 'security'; | ||
|
||
public function up() | ||
{ | ||
$capsule = new Capsule(); | ||
$capsule::schema()->table($this->tableName, function (Blueprint $table) { | ||
$table->boolean('filevault_status')->nullable(); | ||
$table->string('filevault_users')->nullable(); | ||
$table->index('filevault_status'); | ||
$table->index('filevault_users'); | ||
|
||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
$capsule = new Capsule(); | ||
$capsule::schema()->table($this->tableName, function (Blueprint $table) { | ||
$table->dropColumn('filevault_status'); | ||
$table->dropColumn('filevault_users'); | ||
}); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
detail_widgets: | ||
security_detail: | ||
view: security_detail_widget | ||
listings: | ||
security: | ||
view: security_listing | ||
i18n: security.security | ||
reports: | ||
security: | ||
view: security | ||
i18n: security.report | ||
widgets: | ||
firmwarepw: | ||
view: firmwarepw_widget | ||
gatekeeper: | ||
view: gatekeeper_widget | ||
sip: | ||
view: sip_widget | ||
firewall_state: | ||
view: firewall_state_widget | ||
skel_state: | ||
view: skel_state_widget | ||
root_user: | ||
view: root_user_widget | ||
ssh_state: | ||
view: ssh_state_widget | ||
t2_externalboot: | ||
view: t2_externalboot_widget | ||
t2_secureboot: | ||
view: t2_secureboot_widget | ||
activation_lock: | ||
view: activation_lock_widget | ||
security_filevault_status: | ||
view: security_filevault_status_widget | ||
as_security_mode: | ||
view: as_security_mode_widget |
Oops, something went wrong.