<section title="14.4. Software Application Development"><subsection title="Objective"><paragraph
    title="14.4.1."


><![CDATA[<p>Secure programming methods and testing are used for application development in order to minimise the number of coding errors and introduction of security vulnerabilities.</p>]]></paragraph>
 </subsection>
<subsection title="Context"> <block title="Scope"><paragraph
    title="14.4.2."


><![CDATA[<p>This section covers information relating to the development, upgrade and maintenance of application software used on agency systems.</p>]]></paragraph>
</block>
</subsection>
<subsection title="References"><paragraph
    title="14.4.3."


><![CDATA[<p>Additional information relating to software development is contained in:</p><table class="table-main">
<tbody>
<tr>
<td><strong>Reference&nbsp;</strong></td>
<td><strong>Title</strong></td>
<td><strong>Publisher</strong></td>
<td><strong>Source</strong></td>
</tr>
<tr>
<td><strong>ISO/IEC 27001:2013&nbsp;</strong></td>
<td><strong><strong>A.12.5,&nbsp;</strong>Security in Development and Support Processes</strong></td>
<td style="text-align: center;">ISO</td>
<td><a title="Information technology — Security techniques — Information security management systems — Requirements" rel="noopener noreferrer" href="https://www.iso.org/standard/54534.html" target="_blank">https://www.iso.org/standard/54534.html</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<p><strong>OWASP Secure Coding Practices - Quick Reference Guide</strong></p>
</td>
<td style="text-align: center;">OWASP</td>
<td><a rel="noopener noreferrer" href="https://www.owasp.org/index.php/OWASP_Secure_Coding_Practices_-_Quick_Reference_Guide" target="_blank">https://www.owasp.org/index.php/OWASP_Secure_Coding_Practices_-_Quick_Reference_Guide</a>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<p><strong>Secure Code Review</strong></p>
</td>
<td style="text-align: center;">
<p>MITRE Corporation</p>
</td>
<td><a rel="noopener noreferrer" href="https://www.mitre.org/publications/systems-engineering-guide/enterprise-engineering/systems-engineering-for-mission-assurance/secure-code-review" target="_blank">https://www.mitre.org/publications/systems-engineering-guide/enterprise-engineering/systems-engineering-for-mission-assurance/secure-code-review&nbsp;</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<p><strong>Build Security In</strong></p>
</td>
<td style="text-align: center;">
<p>DHS – US-CERT</p>
</td>
<td>
<p><a rel="noopener noreferrer" href="https://www.us-cert.gov/bsi" target="_blank">https://www.us-cert.gov/bsi</a></p>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<p><strong>Application Security - Application Security &amp; Development A To Z</strong></p>
</td>
<td style="text-align: center;">
<p>US Defense Information Security Agency (DISA)</p>
</td>
<td>
<p><a rel="noopener noreferrer" href="http://iase.disa.mil/stigs/app-security/app-security/Pages/index.aspx" target="_blank">http://iase.disa.mil/stigs/app-security/app-security/Pages/index.aspx</a></p>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<p><strong>Writing Secure Code - Michael Howard and David LeBlanc</strong></p>
</td>
<td style="text-align: center;">
<p>Microsoft Press</p>
</td>
<td>ISBN Book 978-0-7356-1722-3<br> ISBN eBook 978-0-7356-9146-9</td>
</tr>
</tbody>
</table>]]></paragraph>
 </subsection>
<subsection title="Rationale &amp; Controls"> <block title="Software development environments"><paragraph
    title="14.4.4.R.01."

    tags="Technical,Software Security"


><![CDATA[<p>Recognised good practice segregates development, testing and production environments to limit the spread of malicious code and minimise the likelihood of faulty code being put into production.<br>Limiting access to development and testing environments will reduce the information that can be gained by an attacker.</p>]]></paragraph>
<paragraph
    title="14.4.4.C.01."

    tags="Technical,Software Security"


    classification="All Classifications"
    compliance="Should"
    cid="1635"
><![CDATA[<p>Agencies SHOULD ensure that software development environments are configured such that:</p><ul>
<li>there are at least three separate environments covering:
<ul>
<li>development;</li>
<li>testing; and</li>
<li>production.</li>
</ul>
</li>
<li>information flow between the environments is strictly limited according to a defined and documented change policy, with access granted only to system users with a clear business requirement;</li>
<li>new development and modifications only take place in the development environment; and</li>
<li>write access to the authoritative source for the software (source libraries &amp; production environment) is disabled.</li>
</ul>]]></paragraph>
</block>
<block title="Secure programming"><paragraph
    title="14.4.5.R.01."

    tags="Technical,Software Security"


><![CDATA[<p>Designing software to use the lowest privilege level needed to achieve its task will limit the privileges an attacker could gain in the event they subvert the software security.</p>]]></paragraph>
<paragraph
    title="14.4.5.R.02."

    tags="Technical,Software Security"


><![CDATA[<p>Validating all inputs will ensure that the input is within expected ranges, reducing the chance that malicious or erroneous input causes unexpected results.</p>]]></paragraph>
<paragraph
    title="14.4.5.C.01."

    tags="Technical,Software Security"


    classification="All Classifications"
    compliance="Should"
    cid="1639"
><![CDATA[<p>Agencies SHOULD ensure that software developers use secure programming practices when writing code, including:</p><ul>
<li>designing software to use the lowest privilege level needed to achieve its task;</li>
<li>denying access by default;</li>
<li>checking return values of all system calls; and</li>
<li>validating all inputs.</li>
</ul>]]></paragraph>
</block>
<block title="Software testing"><paragraph
    title="14.4.6.R.01."

    tags="Technical,Software Security"


><![CDATA[<p>Software reviewing and testing will reduce the possibility of introducing vulnerabilities into a production environment.</p>]]></paragraph>
<paragraph
    title="14.4.6.R.02."

    tags="Technical,Software Security"


><![CDATA[<p>Using an independent party for software testing will limit any bias that can occur when a developer tests their own software.</p>]]></paragraph>
<paragraph
    title="14.4.6.C.01."

    tags="Technical,Software Security"


    classification="All Classifications"
    compliance="Should"
    cid="1643"
><![CDATA[<p>Software SHOULD be reviewed or tested for vulnerabilities before it is used in a production environment.</p>]]></paragraph>
<paragraph
    title="14.4.6.C.02."

    tags="Technical,Software Security"


    classification="All Classifications"
    compliance="Should"
    cid="1644"
><![CDATA[<p>Software SHOULD be reviewed or tested by an independent party as well as the developer.</p>]]></paragraph>
<paragraph
    title="14.4.6.C.03."

    tags="Technical,Software Security"


    classification="All Classifications"
    compliance="Should"
    cid="1645"
><![CDATA[<p>Software development SHOULD follow secure coding practices and agency development standards.</p>]]></paragraph>
</block>
</subsection>
</section>
