Skip to content

microsoft/power-platform-skills / plugins/power-pages/skills/audit-permissions

audit-permissions

Verified

Audits existing table permissions on a Power Pages site by analyzing them against site code and Dataverse metadata, then GRADES the configuration with deterministic 1–5 scores across 3 security/usability/correctness categories (9 dimensions). Detection is anchored by a recurring-issue catalog so findings and severities stay consistent run-to-run. Generates an HTML report with an at-a-glance verdict and per-category scores in the Overview plus a single list of **major/minor** issues (each major issue labelled permissions-only or upstream-caused with a short justification), and suggested fixes. Use when the user wants to review, verify, check, score, or grade table permissions for security issues. Supports SPA and PAC-downloaded non-SPA sites.

scripts/query-table-relationships.js

View on GitHub
#!/usr/bin/env node

// Thin CLI wrapper over scripts/lib/query-table-relationships.js.
// Queries Dataverse for one-to-many relationships on a given table.
// Returns JSON array of { schemaName, referencedEntity, referencingEntity, referencingAttribute }.
//
// Usage:
//   node query-table-relationships.js --envUrl <url> --table <logical_name>
//
// Output (stdout): JSON array (OneToMany relationships only — the audit-permissions
//   relationship-scope validation consumes schemaName + referencedEntity).
//
// Exit codes:
//   0 = success (JSON on stdout)
//   1 = error (message on stderr)

const { getAuthToken } = require('../../../scripts/lib/validation-helpers');
const { fetchTableRelationships } = require('../../../scripts/lib/query-table-relationships');

const args = process.argv.slice(2);
function getArg(name) {
  const idx = args.indexOf('--' + name);
  return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null;
}

const envUrl = getArg('envUrl');
const table = getArg('table');

if (!envUrl || !table) {
  process.stderr.write('Usage: node query-table-relationships.js --envUrl <url> --table <logical_name>\n');
  process.exit(1);
}

(async () => {
  const token = getAuthToken(envUrl);
  if (!token) {
    process.stderr.write('Failed to get auth token. Run: az login --allow-no-subscriptions\n');
    process.exit(1);
  }

  try {
    // OneToMany errors propagate here (preserves the original exit-1-on-API-error
    // behavior); ManyToMany is best-effort inside the lib and unused by this CLI.
    const { oneToMany } = await fetchTableRelationships(envUrl, table, token);
    process.stdout.write(JSON.stringify(oneToMany, null, 2) + '\n');
  } catch (err) {
    process.stderr.write(`Request failed: ${err.message}\n`);
    process.exit(1);
  }
})();
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall