<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mozilla.org/index.php?action=history&amp;feed=atom&amp;title=Common_Python_Code_Vulnerabilities</id>
	<title>Common Python Code Vulnerabilities - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mozilla.org/index.php?action=history&amp;feed=atom&amp;title=Common_Python_Code_Vulnerabilities"/>
	<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Common_Python_Code_Vulnerabilities&amp;action=history"/>
	<updated>2026-05-29T17:35:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Common_Python_Code_Vulnerabilities&amp;diff=494867&amp;oldid=prev</id>
		<title>St3fan: Created page with &quot; Some basic examples of common vulnerabilities found in Python web applications.  == Embedded API Credentials ==   TWITTER_OAUTH_TOKEN = &quot;dkedjekdjekldjekldje&quot;  TWITTER_OAUTH_SEC...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Common_Python_Code_Vulnerabilities&amp;diff=494867&amp;oldid=prev"/>
		<updated>2012-12-19T17:09:40Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; Some basic examples of common vulnerabilities found in Python web applications.  == Embedded API Credentials ==   TWITTER_OAUTH_TOKEN = &amp;quot;dkedjekdjekldjekldje&amp;quot;  TWITTER_OAUTH_SEC...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
Some basic examples of common vulnerabilities found in Python web applications.&lt;br /&gt;
&lt;br /&gt;
== Embedded API Credentials ==&lt;br /&gt;
&lt;br /&gt;
 TWITTER_OAUTH_TOKEN = &amp;quot;dkedjekdjekldjekldje&amp;quot;&lt;br /&gt;
 TWITTER_OAUTH_SECRET = &amp;quot;dkejkdjekdjkejdkjekdjekjdkjed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 AWS_CREDENTIALS = { &amp;#039;key&amp;#039;: &amp;#039;djekjdkejde&amp;#039;, &amp;#039;secret&amp;#039;: &amp;#039;dncndmncdmncd&amp;#039; }&lt;br /&gt;
&lt;br /&gt;
There are also a good amount of very popular wrappers for third party (web) services that we can detect and see if for example static strings are passed to constructors or functions that are known to take credentials.&lt;br /&gt;
&lt;br /&gt;
== Constructed SQL/HTML/JavaScript ==&lt;br /&gt;
&lt;br /&gt;
 response = &amp;quot;&amp;lt;html&amp;gt;%s&amp;lt;/html&amp;gt;&amp;quot; % something&lt;br /&gt;
&lt;br /&gt;
 request = &amp;quot;&amp;lt;html&amp;gt;%s&amp;lt;/html&amp;gt;&amp;quot; % request.parameters(&amp;#039;something&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
== References to internal hosts ==&lt;br /&gt;
&lt;br /&gt;
 LOG_SERVER = &amp;quot;secret.logging.internal.mozilla.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 r = requests.get(&amp;quot;http://some.internal.hosts.that.should.be.hidden&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Python API calls that should raise warnings ==&lt;br /&gt;
&lt;br /&gt;
 import commands&lt;br /&gt;
 template_vars[&amp;#039;output&amp;#039;] = commands.getstatusoutput(&amp;#039;/usr/bin/process_soemthing&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
Questionable useage of MD5:&lt;br /&gt;
&lt;br /&gt;
 hashed_password = hashlib.md5(request.params[&amp;#039;foo&amp;#039;]).hexdigest()&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure we can make a nice list of things to avoid.&lt;br /&gt;
&lt;br /&gt;
== Common vulnerability patterns ==&lt;br /&gt;
&lt;br /&gt;
Need to work on a nice list of dos and donts.&lt;/div&gt;</summary>
		<author><name>St3fan</name></author>
	</entry>
</feed>