Files
mokocli/fix/fix_permissions.php
T
Jonathan Miller ab9f2d5674
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Generic: Repo Health / Access control (push) Successful in 1s
Generic: Repo Health / Site Health (push) Has been skipped
Universal: Auto Version Bump / Version Bump (push) Successful in 8s
feat: security advisory aggregator, manifest API rewrite, namespace rename (#150, #283)
- Add `security:advisories` command — cross-repo CVE scanner via composer audit
  with checkpoint resumability, severity filtering, and auto-issue creation
- Rewrite `manifest:read` to use Gitea manifest API as primary source with
  auto-detection fallback from source tree (no more manifest.xml dependency)
- Rename MokoStandards namespace → MokoCli across all files
- Rename MokoEnterprise namespace → MokoCli across all files
- Rename MokoStandardsParser class → ManifestParser
- Fix composer.json autoload paths: src/ → source/
2026-06-20 20:21:26 -05:00

50 lines
1.4 KiB
PHP

#!/usr/bin/env php
<?php
/* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
*
* This file is part of a Moko Consulting project.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* FILE INFORMATION
* DEFGROUP: MokoPlatform.Scripts.Fix
* INGROUP: MokoPlatform
* REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform
* PATH: /fix/fix_permissions.php
* BRIEF: CLI script to normalise file permissions (dirs 755, files 644, scripts 755)
*/
declare(strict_types=1);
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../lib/Enterprise/CliFramework.php';
use MokoCli\CliFramework;
use MokoCli\FileFixUtility;
class FixPermissions extends CliFramework
{
protected function configure(): void
{
$this->setDescription('Normalise file permissions (dirs 755, files 644, scripts 755)');
$this->addArgument('--path', 'Repository root (default: current directory)', '.');
}
protected function run(): int
{
$path = (string) $this->getArgument('--path');
if ($this->dryRun) {
$this->log('WARNING', 'Would fix permissions (dirs 755, files 644, scripts 755)');
return self::EXIT_SUCCESS;
}
FileFixUtility::fixPermissions($path, $this->dryRun);
$this->log('SUCCESS', 'Permissions fixed');
return self::EXIT_SUCCESS;
}
}
$app = new FixPermissions();
exit($app->execute());