Computer security is security applied to computing devices such as computers and smartphones, as well as to both private and public computer networks, including the whole Internet.

Security is important in programming as a single vulnerability can compromise part or the entirety of a system.

Some measures to increase the security of a system include, but are not limited to, access control, awareness training, audit and accountability, risk assessment, penetration testing, vulnerability management, and security assessment and authorization.

Secure coding

Securing coding is the practice of developing computer software in a way that guards against the accidental introduction of security vulnerabilities. Techniques include reusing already tested code, data canonicalisation and input validation.

There are standards like CERT to help guide programmers to write secure code.

If your code controls safety-critical systems then you should also see the MISRA standards and NASA Rules for Developing Safety Critical Code (which also is relevant to general good practices too).

Information Security

Information security, sometimes shortened to infosec, is the practice of protecting information by mitigating information risks.

Key concepts include confidentiality, data integrity, availability, identification, authentication, authorization, reliability and non-repudiation.