R012: 签名证书APL等级和app-feature配置错误

Scan .p7b signing certificates for incorrect APL and app-feature configurations.

31|6|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill r012-apl-app-feature
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: R012: 签名证书APL等级和app-feature配置错误
Source: https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/check-test-code-quality/rules/R012
Command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill r012-apl-app-feature

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill finds incorrect APL level and app-feature configuration inside signing certificate .p7b files, preventing misclassification of apps (e.g., normal apps incorrectly marked as system_core) and reducing the risk of permission and security issues.

Core Features & Use Cases

  • p7b scanning & extraction: Scans for all .p7b files and extracts relevant fields such as bundle-info.apl and bundle-info.app-feature.
  • Permission A-H classification: Reads acls.allowed-acls and permissions.restricted-permissions, then classifies involved permissions into A-H categories (including handling unknown permissions for manual confirmation).
  • Actionable repair guidance: Produces issue reports with severity, offending fields, permission summary, and one of six scenario-based repair suggestions (auto-fix or requires user confirmation).
  • Signature-safe remediation: Explicitly warns that .p7b files must be regenerated with signing tools rather than edited directly to avoid signature invalidation.

Quick Start

Run the R012 rule to scan your repository for all .p7b files and automatically generate a permission-aware repair suggestion report for every detected APL/app-feature configuration error.

Frequently Asked Questions about R012: 签名证书APL等级和app-feature配置错误

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan .p7b signing certificates for incorrect APL level and app-feature configuration?

To scan .p7b signing certificates for incorrect APL level and app-feature configuration, extract bundle-info.apl and bundle-info.app-feature fields, parse acls.allowed-acls and permissions.restricted-permissions, and classify permissions into A-H categories to identify mismatches during security review.

What is an incorrect APL level in a HarmonyOS signing certificate?

An incorrect APL level in a HarmonyOS signing certificate occurs when a normal app is misclassified with a higher privilege level like system_core. This mismatch between bundle-info.apl and actual restricted permissions creates security vulnerabilities and release compliance issues.

How do I fix APL and app-feature configuration errors in a .p7b file?

To fix APL and app-feature configuration errors in a .p7b file, you must regenerate the file using signing tools rather than editing it directly. The scan generates scenario-based repair suggestions to guide the regeneration and prevent signature invalidation.

Why does editing a .p7b file directly cause signature invalidation?

Editing a .p7b file directly causes signature invalidation because the cryptographic signature no longer matches the modified certificate contents. To maintain release compliance, .p7b files must be regenerated with official signing tools after adjusting APL or app-feature settings.

Can I check .p7b files repository-wide for release readiness?

Yes, you can check .p7b files repository-wide for release readiness by scanning all signature/*.p7b and root-level *.p7b files. The scan extracts APL and app-feature data, classifies permissions into A-H categories, and generates an issue report with severity and repair suggestions.

How are restricted permissions classified when reviewing a signing certificate?

Restricted permissions are classified into A-H categories by parsing acls.allowed-acls and permissions.restricted-permissions from the .p7b file. Unknown permissions are flagged for manual confirmation to ensure accurate permission classification and security review.