Eran Orzel
Oct 27 · 8 min read
The past decade has witnessed multiple organizations rapidly embracing cloud technology which heralds that cloud security has become increasingly important as it could be the only means of infiltrating a company’s defenses. This is precisely why having a security-first mindset is of the utmost importance.
When it comes to threats to security, a recent article from McKinsey showed that most breaches in the cloud happen due to misconfiguration rather than due to outside attacks that compromise the underlying cloud infrastructure. Therefore, having a secure configuration to begin with is safer and more efficient than building a separate security system. The best way to do this would be through Security as Code. This article will act as a guide to Security as Code and the best way to secure your CI/CD pipeline from commit to release.
Security as Code is implementing security into DevOps tools in the early stages of software development, making it an essential part of the workflow. This helps identify vulnerable parts in code beforehand and introduces the required security measures. Since Security as Code protects the entire software development process, it helps quicken the process of developing software by eliminating the need to have separate development and security teams. The security aspect is baked into the development process giving rise to DevSecOps.
Continuous Delivery is the ability to get all changes made to the software delivered to the users in short cycles. Hence, it is efficient to introduce security into this process rather than to implement it once the application is ready.
There are multiple benefits to implementing Security as Code (SaC) but the three main that stand out are –
Security as Code is about getting security practitioners and developers to speak the same language. This communication helps form a continuous feedback cycle by showing results to developers and allowing them to rectify issues during coding itself. SaC helps test all new code in an environment that allows thorough security and low-impact failure. It also allows automated security scans and tests that are injected into the pipeline so that they can be reused across all projects.
The injection of security in the development phase helps reduce the deployment time significantly without causing interruptions in the development process. Security scans are integrated into the developer’s existing tools and processes. SaC helps identify vulnerabilities but developers need proper security training to be able to remediate the flaws after they are identified.
DevOps runs on speed; the goal is to make and release an application into the market as soon as possible without compromising security. This amps up the need for security to be integrated into the process right from the start through DevSecOps. Let’s look at some factors to keep in mind when implementing SaC.
It is important to have predefined security requirements at the beginning of a sprint so that it’s easy to implement and stick to the necessary security requirements. Security models like the OWASP Proactive Controls should be implemented during the development phase in order to have regulated security practices.
Building applications means dealing with layers of codebases that are bound to get entangled. This entanglement causes complications that might go unnoticed and later pop up when the application is deployed. This is where a dependency graph can be a life saver since it helps provide insight into each part of a codebase and how different components work together. This aids in identifying and fixing vulnerabilities.
When choosing tools to introduce security into SDLC, the most important thing to look for is integration. The two questions to consider when it comes to integration are: How easily can the security tool integrate into the development pipeline? How can it best aid development and security teams to work together seamlessly? The integration and function of a security tool must be automated so that it doesn’t cost a developer extra time to initiate a scan and verify its findings.
The next thing a security tool must offer is speed and accuracy without presenting false positives. Lastly, security tools should be able to identify, fix and protect against vulnerabilities in real-time with the ability to address risks in open-source as well.
Adding security into the development process can be slightly challenging in terms of external tests disrupting the development process or if there is a long wait for security approval or if developers aren’t aware that they are coding in an unsecure way. And since both development and security are business drivers in equal respects, they must take on shared responsibility while building and maintaining a DevSecOps culture. The most important part about building a good DevSecOps culture is mutual respect. Security and development must respect each other’s work and come together to work seamlessly. Security tools must be development tools and should be integrated based on the necessary purpose and requirements.
Implementing security during a sprint should be automated to match the fast-paced DevOps environment. Since new code is pushed out rapidly and security controls need to be a part of every single process, automation tools prove to be of great help throughout the SDLC. This also helps provide automated security analysis that helps developers prioritize which code problems to fix first.
When it comes to automated security testing, there are two main types –
It is ideal to use both of these in combination so that each can make up for where the other lacks.
When introducing security tools, it is not ideal to test for a myriad of security issues. Instead, check for one to two security issues at a time so that it helps developers work with the security tool easily by breaking things down to manageable bits.
Threat modeling is a process through which security requirements and threats can be identified. It helps gauge the security efforts required to tackle threats and prioritize remedies accordingly. Threat modeling strengthens the security architecture of an organization by identifying flaws in the designs of applications. It also helps evaluate new forms of attack and highlight assets. Therefore, it is key to conduct a thorough threat modeling before the development process begins.
There are security frameworks that not only help implement security strategies but also help formulate regular evaluation sessions to test the effectiveness of the implemented strategies. It is significant to review the Security as Code practices on a regular basis to see whether or not they are working well and if there are changes to be made.
Building security into the CI/CD pipeline is essential to protecting your software from commit to release. The best way to do this is by choosing the right security tool and there are a few factors to consider when doing that. Defining security requirements beforehand, choosing a tool that fits perfectly with your code, automating security testing for maximum efficiency, conducting threat modeling, reviewing code security practices often, checking code dependency, creating a good DevSecOps environment, and building security measures one code at a time are some of the important factors discussed at length above.
Argon provides a competent security solution that fits with any DevSecOps pipeline with a few key features:
DevSecOps has only recently begun gaining momentum. Hence, there aren’t as many tools in the market that seamlessly bring development and security together. To add to this, the fact that many developers believe adding security to the development process will hinder their process by adding extra work is testament to the fact that there isn’t much awareness and training in most organizations about DevSecOps. This is why it is essential to introduce security into the development phase with minimal interruptions to the development process and with an ease that can help developers recognize its effectiveness. This can be achieved by choosing the best-suited security tools while keeping the above-mentioned guidelines in mind.
DevOps has evolved into a standard practice of software development. According to…
Logging in to websites to access your accounts isn’t as secure as…
Today’s businesses and enterprises are heavily dependent on software and applications for…
Cookie | Duration | Description |
---|---|---|
__hssrc | session | This cookie is set by Hubspot whenever it changes the session cookie. The __hssrc cookie set to 1 indicates that the user has restarted the browser, and if the cookie does not exist, it is assumed to be a new session. |
cookielawinfo-checkbox-advertisement | 1 year | Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category . |
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
elementor | never | This cookie is used by the website's WordPress theme. It allows the website owner to implement or change the website's content in real-time. |
JSESSIONID | session | Used by sites written in JSP. General purpose platform session cookies that are used to maintain users' state across page requests. |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Cookie | Duration | Description |
---|---|---|
__cf_bm | 30 minutes | This cookie, set by Cloudflare, is used to support Cloudflare Bot Management. |
__hssc | 30 minutes | HubSpot sets this cookie to keep track of sessions and to determine if HubSpot should increment the session number and timestamps in the __hstc cookie. |
bcookie | 2 years | LinkedIn sets this cookie from LinkedIn share buttons and ad tags to recognize browser ID. |
lang | session | This cookie is used to store the language preferences of a user to serve up content in that stored language the next time user visit the website. |
lidc | 1 day | LinkedIn sets the lidc cookie to facilitate data center selection. |
messagesUtk | 1 year 24 days | This cookie is set by hubspot. This cookie is used to recognize the user who have chatted using the messages tool. This cookies is stored if the user leaves before they are added as a contact. If the returning user visits again with this cookie on the browser, the chat history with the user will be loaded. |
Cookie | Duration | Description |
---|---|---|
__hstc | 1 year 24 days | This is the main cookie set by Hubspot, for tracking visitors. It contains the domain, initial timestamp (first visit), last timestamp (last visit), current timestamp (this visit), and session number (increments for each subsequent session). |
_ga | 2 years | The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors. |
_ga_1HW5JYG3DC | 2 years | This cookie is installed by Google Analytics. |
_gat_UA-191589358-1 | 1 minute | A variation of the _gat cookie set by Google Analytics and Google Tag Manager to allow website owners to track visitor behaviour and measure site performance. The pattern element in the name contains the unique identity number of the account or website it relates to. |
_gcl_au | 3 months | Provided by Google Tag Manager to experiment advertisement efficiency of websites using their services. |
_gid | 1 day | Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously. |
hubspotutk | 1 year 24 days | This cookie is used by HubSpot to keep track of the visitors to the website. This cookie is passed to Hubspot on form submission and used when deduplicating contacts. |
Cookie | Duration | Description |
---|---|---|
bscookie | 2 years | This cookie is a browser ID cookie set by Linked share Buttons and ad tags. |
test_cookie | 15 minutes | The test_cookie is set by doubleclick.net and is used to determine if the user's browser supports cookies. |
Cookie | Duration | Description |
---|---|---|
AnalyticsSyncHistory | 1 month | No description |
li_gc | 2 years | No description |
UserMatchHistory | 1 month | Linkedin - Used to track visitors on multiple websites, in order to present relevant advertisement based on the visitor's preferences. |