Micro Focus Contributor
Micro Focus Contributor
3238 views

Custom rules for Xcode *.pbxproj file?

Hi team,

a customer asked a question 

He wants to create a rule, which will find specific settings, using regular expressions, in “*.pbxproj” file. It is property file from Xcode (iOS) projects.

Tried to use ConfigurationRule, but it gives some error(no exact error reported by customer), when he set <ConfigFile type="pbxproj">.

pbxproj file for example in attachment.

How can He find text in this specific file using custom rules?

Here an example of my custom rule:

<?xml version="1.0" encoding="UTF-8"?>

<RulePack xmlns="xmlns://www.fortifysoftware.com/schema/rules"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RulePack">

    <RulePackID>879B24E8-9EBD-4072-ABDB-314AD7B8F40E</RulePackID>

    <SKU>SKU-879B24E8-9EBD-4072-ABDB-314AD7B8F40E</SKU>

    <Name><![CDATA[Xcode_set_PIE.xml]]></Name>

    <Version>1.0</Version>

    <Description><![CDATA[Description for Xcode_set_PIE.xml]]></Description>

    <Rules version="16.20">

        <RuleDefinitions>

            <ConfigurationRule formatVersion="16.20">

                <RuleID>44EA5D85-10E4-4367-BF37-D5ABF810A38C</RuleID>

                <VulnKingdom></VulnKingdom>

                <VulnCategory>PIE value set to YES</VulnCategory>

                <VulnSubcategory></VulnSubcategory>

                <DefaultSeverity>1</DefaultSeverity>

                <Description></Description>

                <ConfigFile type="pbxproj">

......

Thank you in advance,

Val Kuvaev

Pre-sales TC

Tags (2)
0 Likes
0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.