Add mobile-provisions extension#25178
Add mobile-provisions extension#25178Ernest0-Production wants to merge 1 commit intoraycast:mainfrom
Conversation
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
Greptile OverviewGreptile SummaryThis PR adds a new Key risk is in the provisioning profile parsing implementation: it currently decodes the entire CMS container as UTF-8 and slices XML by string search, which can fail on real profiles. There is also a TypeScript compile issue in the main command due to referencing Confidence Score: 3/5
Important Files Changed
|
| }, | ||
| issuer: { | ||
| commonName: issuer.CN ?? "", | ||
| }, | ||
| validity: { | ||
| notBefore: cert.validity.notBefore, | ||
| notAfter: cert.validity.notAfter, | ||
| }, | ||
| }; | ||
| } | ||
|
|
||
| export async function parseProvisioningProfile(filePath: string): Promise<ProvisioningProfile> { | ||
| const fileContent = await fs.readFile(filePath); | ||
| const fileContentString = fileContent.toString("utf8"); | ||
|
|
||
| const plistStartIndex = fileContentString.indexOf("<?xml"); | ||
| const plistEndIndex = fileContentString.indexOf("</plist>") + "</plist>".length; | ||
|
|
There was a problem hiding this comment.
Binary-to-utf8 conversion breaks parse
parseProvisioningProfile() converts the entire .mobileprovision (a CMS container) to a UTF-8 string and then searches for <?xml / </plist>. This will corrupt bytes for many profiles and can cause indexOf to miss the XML or produce an invalid plist substring. Extract the XML from the raw Buffer without UTF-8 decoding (e.g., search in a latin1/binary string, or use a CMS parser and then decode just the plist payload).
Description
A Raycast extension that helps you manage and inspect Apple mobile provisioning profiles installed on your system. View detailed information about certificates, entitlements, provisioned devices, and more.
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder