Secure Coding Practices (Essay Sample)
Discuss two Secure Coding Practicessource..
Secure Coding Practices
Secure Coding Practices
There are many well-known software threats; among the most common and dangerous ones is Script injection. This type of vulnerability often happens when a programmer fails to limit the running of external scripts or commands inside their software. An attacker tries to find loopholes in the system where they can patch their code which may give them access to some parts or the whole software system (Robert Seacord,2018). This may happen due to reasons such as poor coding structure, lack of privilege limitation, lack of proper validation and sanitization of user-supplied data, and lack of proper testing. These are basic secure coding practices to solve such threats
Data sanitization and validation
Data Validation is the process of checking if data got from the user is of quality, meets the format, and is of the correct data type. By doing data validation, the programmer will limit what gets to be saved in the system. An example of data validation in python is:
The code checks if the supplied data is an integer
regCode = input('Enter your registration code : ') # prompts to enter value.
if regCode.isdigit(): # returns true if all digits otherwise false.
#do some code
print(“the code you entered is not numeric”)
Data sanitization on the other hand refers to the process of rendering any data received from a user harmless. Some inputs from the user may contain data that can be run on the software to provide a way to run a script. Below is an example in python:
The code sanitizes html tags
input = '
- World Vision CritiqueDescription: Most of these non-profit organizations are based on churches and religious institutions which donate to these organizations to facilitate the help. World Vision is one of the largest non-profit organization privately funded by Christians to help support the vulnerable groups of people in various countries around the globe....2 pages/≈550 words| 3 Sources | APA | Literature & Language | Essay |
- Defenses and Excuses and Their Effects on VictimsDescription: Criminal justice system is deemed as back bone of a civilized society. It holds significant responsibility in providing justice. It is reflection of a society to know that how much justice system is fair to all. A criminal system consists of five components that are law enforcement, prosecution, defense att...2 pages/≈550 words| 3 Sources | APA | Literature & Language | Essay |
- Business Start-up: Visioning Before StrategizingDescription: Starting a business requires two major factors to be recognized for energizing the enterprise progress and achieve success. First is finance and second is human resource. This treatise will enumerate all about human resource management from visioning, strategizing to managing the human capital....2 pages/≈550 words| 3 Sources | APA | Literature & Language | Essay |