<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>security on Rise-</title><link>https://madil.in/tag/security/</link><description>Recent content in security on Rise-</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 09 Feb 2023 12:07:37 +0000</lastBuildDate><atom:link href="https://madil.in/tag/security/index.xml" rel="self" type="application/rss+xml"/><item><title>TIL - React's Auto Escaping</title><link>https://madil.in/til-reacts-auto-escaping/</link><pubDate>Thu, 09 Feb 2023 12:07:37 +0000</pubDate><guid>https://madil.in/til-reacts-auto-escaping/</guid><description>&lt;p&gt;React escapes most of the strings to prevent the possibility of cross-site scripting (XSS) attacks. However, there are certain cases where escaping does not happen by default.&lt;/p&gt;&#10;&lt;p&gt;The API for creating elements looks like this -&lt;/p&gt;&#10;&lt;div class="code-block not-prose group relative my-7" x-data="copy(function () { return this.$root.querySelector('pre').innerText })"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#abb2bf;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e06c75"&gt;React&lt;/span&gt;.&lt;span style="color:#e06c75"&gt;createElement&lt;/span&gt;(&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e06c75"&gt;type&lt;/span&gt;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; [&lt;span style="color:#e06c75"&gt;props&lt;/span&gt;],&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; [...&lt;span style="color:#e06c75"&gt;children&lt;/span&gt;]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="absolute right-2 top-2 flex items-center gap-2"&gt;&lt;span class="select-none text-xs uppercase tracking-wider text-white/40 transition-opacity group-hover:opacity-0"&gt;javascript&lt;/span&gt;&#10; &lt;button type="button" @click="copy()" data-track="code_copied" data-track-props='{&amp;#34;language&amp;#34;:&amp;#34;javascript&amp;#34;}' class="absolute right-0 flex items-center gap-1 rounded-md bg-white/10 px-2 py-1 text-xs text-white/80 opacity-0 transition-opacity hover:bg-white/20 focus:opacity-100 group-hover:opacity-100"&gt;&#10; &lt;span x-text="copied ? 'Copied' : 'Copy'"&gt;Copy&lt;/span&gt;&#10; &lt;/button&gt;&#10; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;When passed a dangerous value to &lt;code&gt;[...children]&lt;/code&gt;, the data will be escaped and not be treated as code or executed in the Javascript context of the current page. This handy feature provides security controls preventing cross-site scripting (XSS) attacks.&lt;/p&gt;</description></item><item><title>TIL - Tracing Syscalls using Aquasec Tracee</title><link>https://madil.in/til-tracing-syscalls-using-aquasec-tracee/</link><pubDate>Sat, 12 Nov 2022 08:30:23 +0000</pubDate><guid>https://madil.in/til-tracing-syscalls-using-aquasec-tracee/</guid><description>&lt;p&gt;To check all the syscalls made from a container use the Tracee tool developed by Aqua Security.&lt;/p&gt;&#10;&lt;p&gt;Below docker run command will trace all the new syscalls made from new containers.&lt;/p&gt;&#10;&lt;div class="code-block not-prose group relative my-7" x-data="copy(function () { return this.$root.querySelector('pre').innerText })"&gt;&lt;pre tabindex="0"&gt;&lt;code&gt;docker run --name tracee --rm --privileged \&#10; -v /lib/modules/:/lib/modules/:ro \&#10; -v /usr/src:/usr/src:ro -v /tmp/tracee:/tmp/tracee -it \&#10; aquasec/tracee:0.4.0 --trace container=new&lt;/code&gt;&lt;/pre&gt;&lt;div class="absolute right-2 top-2 flex items-center gap-2"&gt;&#10; &lt;button type="button" @click="copy()" data-track="code_copied" data-track-props='{&amp;#34;language&amp;#34;:&amp;#34;text&amp;#34;}' class="absolute right-0 flex items-center gap-1 rounded-md bg-white/10 px-2 py-1 text-xs text-white/80 opacity-0 transition-opacity hover:bg-white/20 focus:opacity-100 group-hover:opacity-100"&gt;&#10; &lt;span x-text="copied ? 'Copied' : 'Copy'"&gt;Copy&lt;/span&gt;&#10; &lt;/button&gt;&#10; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;a class="bookmark-card" href="https://github.com/aquasecurity/tracee" target="_blank" rel="noopener"&gt;&#10; &lt;span class="bookmark-content"&gt;&#10; &lt;span class="bookmark-title"&gt;GitHub - aquasecurity/tracee: Linux Runtime Security and Forensics using eBPF&lt;/span&gt;&lt;span class="bookmark-description"&gt;Linux Runtime Security and Forensics using eBPF. Contribute to aquasecurity/tracee development by creating an account on GitHub.&lt;/span&gt;&#10; &lt;span class="bookmark-meta"&gt;&lt;img class="bookmark-icon" src="https://github.com/fluidicon.png" alt="" loading="lazy"&gt;&lt;span&gt;aquasecurity&lt;/span&gt;&#10; &lt;/span&gt;&#10; &lt;/span&gt;&lt;span class="bookmark-thumb"&gt;&lt;img src="https://opengraph.githubassets.com/6f23fbe07e784db031aa7b211bfe511094104455d02cf4dc8adf6b8ff83f3508/aquasecurity/tracee" alt="" loading="lazy"&gt;&lt;/span&gt;&lt;/a&gt;</description></item><item><title>TIL - Securing Virtual Private Servers with Tailscale</title><link>https://madil.in/til-securing-virutal-private-servers-with-tailscale/</link><pubDate>Sun, 10 Apr 2022 08:31:23 +0000</pubDate><guid>https://madil.in/til-securing-virutal-private-servers-with-tailscale/</guid><description>Secure your servers with a zero-config VPN solution from Tailscale.</description></item><item><title>Avoid Race Conditions in Django</title><link>https://madil.in/avoid-race-conditions-in-django/</link><pubDate>Sun, 27 Dec 2020 17:30:00 +0000</pubDate><guid>https://madil.in/avoid-race-conditions-in-django/</guid><description>A brief introduction to race conditions and building more secure Django applications by avoiding race condition bugs.</description></item></channel></rss>