<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Matthew Setter on Medium]]></title>
        <description><![CDATA[Stories by Matthew Setter on Medium]]></description>
        <link>https://medium.com/@settermjd?source=rss-d8be98cdccce------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*lnxEkcG1d-2HTdN2.jpg</url>
            <title>Stories by Matthew Setter on Medium</title>
            <link>https://medium.com/@settermjd?source=rss-d8be98cdccce------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 15:15:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@settermjd/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My Health Record - Is It Worth The Risk?]]></title>
            <link>https://medium.com/@settermjd/my-health-record-is-it-worth-the-risk-dc404ac86aae?source=rss-d8be98cdccce------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc404ac86aae</guid>
            <category><![CDATA[online-security]]></category>
            <category><![CDATA[my-health-records]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[australian-politics]]></category>
            <category><![CDATA[healthcare]]></category>
            <dc:creator><![CDATA[Matthew Setter]]></dc:creator>
            <pubDate>Wed, 01 Aug 2018 07:51:43 GMT</pubDate>
            <atom:updated>2018-08-01T07:51:43.022Z</atom:updated>
            <content:encoded><![CDATA[<h3>My Health Record — Is It Worth The Risk?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/0*J9fOW2DfGj1CqA00.png" /></figure><p>A new health record management system is going live in Australia soon. It’s called My Health Record. It will affect every Australian (and potentially temporary and permanent residents as well) as it will store some of their most intimate information — their health records!</p><p>But do the risks of such a system outweigh the advantages?</p><p>Starting development around 2009, the system has cost at least AUD 2 billion and <a href="https://www.myhealthrecord.gov.au/sites/g/files/net4206/f/hd117_guide_-_how_to_set_access_controls_v7_accessible_dv003.pdf?v=1520820393">is touted as being</a>:</p><blockquote><em>A secure online portal, designed to provide a summary of your health information to trusted medical professionals.</em></blockquote><p>However, <a href="http://www.abc.net.au/news/science/2018-07-15/my-health-record-questions-answers-security-privacy-police/9959622">according to the ABC</a>:</p><blockquote><em>It’s not a comprehensive picture of your health — it will only contain what you and your doctors choose to upload, and will depend on the quality of those records.</em></blockquote><p>Yet, despite the comprehensive nature of the project little information exists about it; whether on billboards around at airports, or via advertisements on television, social media, or in the traditional newspaper press.</p><p>Given that, it must be quite a surprise when you find out about the existence of the system, and that <a href="https://www.myhealthrecord.gov.au/for-you-your-family/opt-out-my-health-record">unless they opt-out</a> a record will automatically be created for you.</p><h3>What’s In a Health Record?</h3><p>To be as specific as possible, the record:</p><blockquote>can<em> include details of your medical conditions and treatments, medicine details, allergies, and test or scan results, all in one place.</em></blockquote><p>Each record is created from <strong>up to 2 years of health information from your <em>Medicare</em> records</strong>, which can include:</p><ul><li>Medicare and Pharmaceutical Benefits Scheme (PBS) information held by the Department of Human Services</li><li>Medicare and Repatriation Schedule of Pharmaceutical Benefits (RPBS) information stored by the Department of Veterans’ Affairs (DVA)</li><li>Organ donation decisions</li><li>Immunisations that are included in the Australian Immunisation Register, including childhood immunisations and other immunisations received</li></ul><p>Once a record is created:</p><blockquote><em>Healthcare providers such as GPs, specialists and pharmacists </em>can<em> add clinical documents about your health to your record, including: — An overview of your health uploaded by your doctor, called a shared health summary. This is a useful reference for new doctors or other healthcare providers you visit — Hospital discharge summaries — Reports from test and scans, like blood tests — Medications that your doctor has prescribed to you — Referral letters from your doctor(s).</em></blockquote><p>Regarding how Healthcare providers can update your record, <a href="https://twitter.com/MyHealthRec">the My Health Record twitter account</a> says that:</p><blockquote><em>Healthcare providers access My Health Record through their own integrated software system and the timeout rules are subject to the specific clinical system.</em></blockquote><p>I’ve yet to find out what the “<em>integrated software</em>” is, but I’ll update this post when I do. Then there’s one other point to remember. The OAIC (Office of the Australian Information Commissioner) <a href="https://www.oaic.gov.au/agencies-and-organisations/business-resources/privacy-business-resource-22-ways-you-can-protect-patient-privacy-when-using-the-my-health-record-system">says</a>:</p><blockquote><em>A healthcare provider organisation can upload information to a patient’s My Health Record </em>even if the patient has set access controls<em>. A healthcare provider organisation </em>should not<em> upload information to a record if a consumer requests them not to.</em></blockquote><h3>How Long Does a Record Last For?</h3><p>Once created, the records persist until either:</p><ol><li>At least 30 years after an individual’s death; or</li><li>130 years after an individual’s birth — if it is not known when they died.</li></ol><p>Sounds OK, <strong>No?</strong></p><h3>What Are The Top Concerns?</h3><p>Being a security researcher, warning bells — <em>which rapidly changed to alarm bells</em> — went off in my mind. You might not appreciate why I was becoming so concerned. You might see the system in a completely different light, as something benign and beneficial.</p><p>On the surface of it, the system sounds like a valuable and time-saving system. Given the current system, where records may need to be emailed or faxed, duplicated between a range of different health care providers and specialists, that’s understandable.</p><p>To be fair, <em>if handled well</em> this <em>could</em> be a massive win for the Australian population. Think about it; all your medical records in one place, able to be easily located and accessed. What’s more, if you change doctor you don’t have to tell the next one your medical history, as they can see it online for themselves.</p><p>If you need emergency care or have to visit several specialists to identify a medical issue, the benefits of the system only increase further. Conceptually, that’s something to work towards. However, that’s where it all breaks down for me. Here’s why.</p><h3>The Records are Centrally Located</h3><p>If the records are hacked or lost, consider the implications of such intimate and personal information being available for anyone to see.</p><p>Once that information is lost, what might it mean if it was later uncovered by anyone other than the health authorities?</p><ul><li>Could an insurer decline to accept you as a customer, decline to renew your subscription, or inflate your premiums?</li><li>Could you be discriminated against by an employer based on your sexuality, such as being a member of the LGBTIQ community?</li><li>Could you be discriminated against by an organisation based on preconceptions around why you either sought out or were prescribed specific medication?</li><li>Could you be declined service at a government department based on some aspect of your medical history?</li></ul><p>And these are just some of the potential implications.</p><p>Perhaps you don’t think that centrally located health information is a genuine concern. However, it is. Centrally-located information is far easier to hack than data that is distributed.</p><p>This happened in the UK twice. The first was when <a href="https://www.theguardian.com/society/2017/feb/26/nhs-accused-of-covering-up-huge-data-loss-that-put-thousands-at-risk">the NHS (National Health System) lost more than half a million pieces of confidential medical correspondence</a>. In that case, <strong>up to 708,000 pieces were lost</strong>.</p><p>The second, also in the UK, <a href="https://inews.co.uk/news/nhs-patient-data-lost-following-glitch-gp-surgeries/">was the result of “an IT glitch”</a>. As a result:</p><blockquote><em>GPs will be forced to review the records of over 44,000 records across more than 2,500 GP practices in England following the error, which led to the loss of vaccination information and pathology results.</em></blockquote><p>As the information is centrally located, it’s reasonable to expect that the security measures will be exceptionally well thought out, implemented, reviewed, and improved on a regular basis. However, are they? It’s unclear.</p><p>The most detailed information that I’ve been able to find <a href="https://www.myhealthrecord.gov.au/for-you-your-family/howtos/learn-about-my-health-record-system-security">is this</a>:</p><blockquote><em>We use a range of technology to protect the sensitive personal and health information held in the My Health Record system, including:</em></blockquote><ul><li>Firewalls to block unauthorised access</li><li>Audit logs to track access to records</li><li>Initial and regular anti-virus scanning of documents uploaded to records, and</li><li>System monitoring to detect suspicious activity.</li></ul><p>Let’s consider each of these points.</p><p>I’m assuming that they’re referring to a standard firewall here, not a <em>Web Application Firewall</em> (WAF). To the layperson, using a term such as “<em>firewalls</em>” might sound impressive, but <a href="https://blog.sqreen.io/why-web-application-firewalls-fail-to-protect-web-applications/">as I’ve covered previously</a>, firewalls are a pretty blunt and broad tool.</p><p>It makes <em>more</em> sense to use a WAF. If you’re not familiar with a WAF, it’s a special-purpose firewall for HTTP/S-based applications. Given that, that’s what My Health Record is, then it’s logical to use one over a traditional firewall.</p><p>However, even these have shortcomings, which include:</p><ul><li>They can generate false positives and false negatives</li><li>They can be easily bypassed</li><li>They provide no protection against 0-Day exploits</li><li>Their rules have to be maintained as the application changes</li></ul><h3>Audit Logs To Track Access To Records</h3><p>Logging is a must in any application. Developers and systems administrators need this information so that they can ascertain what went wrong, when, where, and why. However, from the title above, it’s not clear as to whether the information is user-facing or only for support staff. If it’s user-facing, what details does it contain?</p><p><strong>Will a user know:</strong></p><ul><li>Whose credentials were used to access their information?</li><li>The location from which the record was accessed, including country and town?</li><li>The IP address of the access location?</li></ul><p>In addition to this information, will accesses from anyone other than the owning user require a reason to be provided? If the information is internal, for systems administrators and support staff:</p><ul><li>Is it stored internally in the same data centre as the My Health Record application?</li><li>Is it stored externally, using an external provider such as <em>Loggly</em>, <em>Splunk</em>, <em>Rollbar</em>, or <em>Gralog</em>?</li><li>What information is contained in a log entry?</li></ul><p>It’s essential to know this because while it’s stated that the health records must be stored in Australia, it’s not clear that that applies to log information. Secondly, it’s quite common for log data to contain sensitive information accidentally, such as user credentials, information that can be used to hack the system.</p><h3>Initial and Regular Anti-virus Scanning of Documents Uploaded to Records</h3><p>How regular is “<em>regular</em>”? Hourly? Daily? Weekly? Monthly? Does “<em>Initial</em>” mean on file upload? While it’s excellent that anti-virus scanning of (I’m assuming all) documents occurs as a regular part of the service, there are a range of other <a href="https://www.owasp.org/index.php/Unrestricted_File_Upload">security best practices to observe</a>. For example:</p><ul><li>Are there restrictions on uploadable file types?</li><li>Are there restrictions on the maximum uploadable file size?</li><li>Where are the files stored after upload?</li><li>How are the files stored after upload?</li><li>Have attacks such as path traversal and path manipulation been accounted for?</li></ul><h3>System Monitoring to Detect Suspicious Activity</h3><p>What defines suspicious activity? <a href="https://twitter.com/settermjd/status/1021469606127505409">I asked this of @MyHealthRec</a> recently. If you missed the tweet thread, here are some of the questions that I asked:</p><p>What happens when unauthorised access occurs, such as my doctor’s credentials being used to access my records from two different locations simultaneously — regardless of whether they were in the same town or a different country?</p><p>Will the access be automatically detected and blocked? If so, will I then be notified within a short period after that by phone or SMS? Alternatively, will I be notified via a slower and more indirect means, such as email? At some point, access credentials will slip out, so it’s essential to know how this will be handled.</p><p>Alternatively, will I have to contact support when I see suspicious activity? This is concerning, as the onus for checking access appears to be placed on the individual. I say this because I found this on <a href="https://matthewsetter.com/myhealthrecord-do-the-risks-outweight-the-advantages/the%20section%20on%20privacy%20and%20security%20contains%20the%20following">a report by the ABC</a>:</p><blockquote><em>You can also set up an email or SMS alert for when a healthcare organisation accesses your record for the first time. The privacy commissioner recommends regularly checking for unexpected or unauthorised access. You can call the ADHA on 1800 723 471 if you think something’s gone wrong.</em></blockquote><p>While a good start, this concerns me for two reasons. Firstly, it says that an email or SMS alert is sent when organisations access your records the first time. However,</p><ul><li>What about any time after that?</li><li>What about if fraudulent activity was suspected?</li></ul><p>Then, “<em>The privacy commissioner recommends checking regularly for unexpected or unauthorised access.</em>”. Human habits being what they are, what percentage of people are going to do this? It’s fair to say that it won’t be the majority.</p><p>Given these two things, it appears that if you find out about suspicious activity on your record or access, you don’t consent to, it’s only going to be <strong>after</strong> the fact.</p><h3>How Can You Control Who Access Your Records, When, and Why?</h3><p><a href="http://www.abc.net.au/news/science/2018-07-15/my-health-record-questions-answers-security-privacy-police/9959622?pfmredir=ms">A post on the ABC</a> raises many concerning questions about who can access your records, along with when, how, and why. It seems that the limitations are far from clear. What is known is that your records are:</p><blockquote><em>reserved for people who work for a registered healthcare provider and who are authorised to provide you with care</em></blockquote><p>If you want to limit access to your data, <a href="https://www.myhealthrecord.gov.au/for-you-your-family/howtos/set-privacy-and-security-controls">you can do three things</a>:</p><ol><li>Set a <strong>Record Access Code (RAC)</strong>: This controls which healthcare provider organisations can see your record.</li><li>Set a <strong>Limited Document Access Code (LDAC)</strong>: This controls healthcare providers organisations’ access to specific documents</li><li>Set a <strong>Personal Access Code (PAC)</strong>: This allows your nominated representative(s) to access your My Health Record.</li></ol><p>That all sounds pretty good, and I agree. However, if you read the information more carefully, you’ll find the following:</p><blockquote><em>Please note that when emergency access is granted, any access controls previously set are overridden. This means that any restricted information can be accessed in an emergency.</em></blockquote><p><a href="https://www.myhealthrecord.gov.au/for-you-your-family/howtos/emergency-access-my-health-record">Emergency access is defined as</a>:</p><blockquote><em>If you have set an access code for your My Health Record and there is a serious threat to your life, health or safety, emergency access to your record may be provided. If you were unconscious, for example, hospital staff may be granted access to your record if there is serious threat to your health or safety.</em></blockquote><p>Now that’s perfectly understandable. If you’re not able to act on your behalf, then it’s essential that someone else can. However, that’s not the end of the story. There’s another reason for providing emergency access:</p><blockquote><em>Emergency access may also be granted to lessen or prevent a serious threat to public health or safety.</em></blockquote><p>Again, on the surface of it, this sounds reasonable, yet it’s still very broad. What’s more, there’s <a href="https://www.myhealthrecord.gov.au/sites/g/files/net4206/f/hd315_factsheet_secondaryuseofdata_faweb.pdf?v=1531636470">a “secondary use” provision</a>.</p><p>Here’s the brief version of what it means:</p><blockquote><em>My Health Record data may be used to provide insight into Australia’s health system and the services being provided to improve health outcomes for patients. Find out how My Health Record data can improve health outcomes for all Australians. </em>If you are happy for your data to be used for secondary purposes such as research, you don’t need to do anything.</blockquote><p>Note how that last sentence ends: “<em>you don’t need to do anything</em>”. This says that, unless you opt out — assuming that you knew you were opted in — your records are included in information used to provide said insight.</p><p>That said, from what I’ve ascertained, the information is only available in an aggregated and anonymised form; meaning that it <strong><em>should</em></strong> be impossible to link information to an individual. Intentional emphasis added on “should”. <a href="https://www.techrepublic.com/article/de-anonymizing-web-browsing-histories-may-reveal-your-social-media-profiles/">Research has already shown</a> that anonymised information can be de-anonymised.</p><p>This concerns me for several reasons, <strong>primarily because…</strong></p><p>Users can see who has looked at their records. This information includes:</p><ul><li>When their record was accessed.</li><li>Which organisation accessed it; and</li><li>How the record changed.</li></ul><p>However, they won’t be able to know, for sure, <em>precisely</em> who accessed their information. In part this makes sense, and in part, it doesn’t. Either way, it’s concerning.</p><p>What’s more concerning, however, is the legislation that governs access, <a href="http://classic.austlii.edu.au/au/legis/cth/consol_act/mhra2012180/s70.html">the My Health Records Act 2012</a>. This was <a href="https://www.couriermail.com.au/rendezview/as-a-doctor-heres-why-my-health-record-worries-me/news-story/0584c4b6ff55f2936fe4e84f3985bdb6">pointed out recently</a> by Dr Karyn Phelps, former AMA (the <em>Austrlian Medical Association</em>) head.</p><p>After reading through the relevant sections of the act, it appears that access may be available to all of the following:</p><ul><li>The Police</li><li>The Australian Taxation Office</li><li>The Courts</li><li>The Veterans Affairs Department</li><li>The Defense Department</li><li>The Department of Human Services</li><li>Medicare</li><li>Any established regulatory body</li><li>A body established by the Commonwealth</li><li>Any Australian Public Service employee in the above departments</li><li>Ministerial Council for data purposes</li><li>Computer programs as designated by the “System Operator.”</li><li><strong><em>Any other person with the consent of the Minister</em></strong></li></ul><p>As Dr Phelps shared in her article:</p><blockquote><em>These provisions break the bond between clinician and patient. The idea that police and security agencies, and the ATO and other agencies could trawl these databases at will is abhorrent. To its great shame, the Parliament passed these provisions.</em></blockquote><p>And <a href="https://www.theguardian.com/australia-news/2018/jul/26/my-health-record-greg-hunts-warrant-claims-contradicted-by-police-union?CMP=share_btn_tw">according to The Guardian</a>, <em>the Queensland Police Union</em> (QPU), after taking legal advice, says the following about record access requirements:</p><blockquote><em>Access to My Health Record will not be limited to police, as the list of enforcement bodies who may access records includes the immigration department, anti-corruption commissions, financial regulators and any other agencies that impose fines or are tasked with the “</em>protection of the public revenue<em>”.</em></blockquote><p>The Guardian’s report goes on further to say:</p><blockquote><em>[the QPU has] legal advice that there is nothing in the legislation that requires any enforcement body to obtain a warrant to access My Health Record.</em></blockquote><p>This clearly suggests that a — <strong>now removed</strong> — article from the Parliamentary Library was correct when it said:</p><blockquote><em>It represents a significant reduction in the legal threshold for the release of private medical information to law enforcement. As legislation would normally take precedence over an agency’s ‘operating policy’, this means that unless the ADHA has deemed a request unreasonable, it cannot routinely require a law-enforcement body to get a warrant, and its operating policy can be ignored or changed at any time.</em></blockquote><p>And here’s something concerning that <a href="https://www.zdnet.com/article/australians-cannot-opt-out-of-my-health-record-today-because-medicare-is-down/">ZDNet wrote recently</a>, to round out this point:</p><blockquote><em>Those types of clauses in other legislation has previously allowed the likes of Bankstown City Council, Victorian Taxi Services, the RSPCA of Victoria, and Australia Post to get their hands on telecommunications data in the past</em></blockquote><p>Can you see why having such broad access is so concerning?</p><p><strong>UPDATE</strong></p><p><a href="https://www.theguardian.com/australia-news/2018/jul/31/my-health-record-greg-hunt-promises-to-redraft-legislation-after-public-outcry">According to a report by the Guardian</a>, new privacy protections will be added to the controlling legislation to ensure that the service can only be used for medical purposes.</p><p>And <a href="https://twitter.com/bengrubb/status/1024242040148639744">according to a Media Release by Health Minister Greg Hunt</a> there are two excellent changes to the legislation.</p><p><strong>Firstly:</strong></p><blockquote><em>This policy requires a court order to release any My Health Record information without consent. The amendment will ensure no record can be released to police or government agencies, for any purpose, without a court order.</em></blockquote><p><strong>Secondly:</strong></p><blockquote><em>In addition, the Government will also amend Labor’s 2012 legislation to ensure if someone wishes to cancel their record they will be able to do so permanently, </em><strong><em>with their record deleted from the system.</em></strong></blockquote><p>The changes are yet to be enacted. But it’s heartening to hear that concerns have been listened to.</p><p>According to <a href="http://classic.austlii.edu.au/au/legis/cth/consol_act/mhra2012180/s70.html">section 70 of the My Health Records Act</a>:</p><blockquote><em>The ADHA is authorised, by law, to disclose someone’s health information if the ADHA “</em>reasonably believes<em>” it’s necessary for preventing or investigating crimes and “</em>protecting the public revenue<em>”.</em></blockquote><p>On the whole, that sounds reasonable. If law enforcement reasonably believes that by accessing someone’s information they can prevent a crime, then it’s arguable that they should have access. You’d like to think that they could do their job and protect the public.</p><p>However, what does “<em>protecting the public revenue</em>” mean? The closest definition that I could find is this one from <a href="https://www.oic.qld.gov.au/guidelines/for-government/guidelines-privacy-principles/use-and-disclosure/use-or-disclosure-for-law-enforcement-or-revenue-protection#new_div_21779">the Office of The Queensland Information Commissioner</a>:</p><blockquote><em>The public revenue includes levies, taxes, rates and royalties charged on a regular basis. It does not include occasional charges, such as fines, or the recovery of the occasional overpayment by an agency. Protection of the public revenue includes the activities of agencies and bodies intended to ensure that lawful obligations are met by those subject to the charges, such as routine collection, audits, investigatory and debt recovery actions. Prosecution for failure to pay the charge would fall under the criminal law exception. Activities intended to identify and eliminate inefficient but lawful spending of public money will not fall within these IPPs.</em></blockquote><p>How does that apply to a health record management system?</p><h3>Apps Can Access Your Data</h3><p>According to Tim Kelsey, the person in charge of the process, initially, apps which you consent to give access to, can “<em>show</em>” people their records, but won’t be able to store them.</p><p>According to the ADHA (<a href="https://www.digitalhealth.gov.au/">the Australian Digital Health Agency</a>), any apps that seek to access your data undergo a “<em>strict assessment</em>” and need to abide by a <a href="https://www.digitalhealth.gov.au/about-the-agency/freedom-of-information-foi/agency-plan/Portal-Operator-Agreement-_ViewOnlyAccess.pdf">Portal Operator Registration Agreement</a>. The agreement includes that:</p><blockquote><em>They do not download or store My Health Record information on their own system, or pass that data on to a third party.</em></blockquote><p>I see several problems with this situation. Firstly, will users always know — for sure — that they have consented to give apps access to their health records?</p><p>We need only consider how Facebook presents the choice for users to opt-out of facial recognition on their platform, which you can see in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/0*tNbkhwjJe7wP3IDo.jpg" /></figure><p>While you can toggle a Yes/No select box, the text above it, and in several of the steps required to get to this point, make it appear as though this is not the choice that you want to make and that you’ll be left out of many positive things if you do opt-out.</p><p>Will apps you allow access to your My Health Record data act in the same, or a similar way?</p><p>If you’re interested, <a href="http://www.abc.net.au/news/2018-07-24/digital-health-agency-changes-my-health-record-app-contracts/10026644">the currently known list</a> of apps that can access your My Health Record are:</p><ul><li>Telstra</li><li>HealthEngine</li><li>Tyde; and</li><li>Healthi</li></ul><h3>Do We (Really) Understand What We’re Agreeing To?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/0*AQ8UEXlMsAiA0ZyJ.png" /></figure><p>Next, consider privacy policies and terms and conditions that we’ve all agreed to before we can install or use an app or service. How many of us read them, or read them in their entirety.? Of those that do, how many of us fully understand the implications? For an excellent example, have a read of <a href="https://www.microsoft.com/en-us/Useterms/Retail/Windows/10/UseTerms_Retail_Windows_10_English.htm">the license terms for Microsoft Windows</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/0*FXY0xdKowUoXhY_8.jpg" /></figure><p>Alternatively, will the information provided when consent is requested, be too broad in nature? Take the example above of when the HealthEngine app requests consent to access My Health Record account. Is that sufficiently detailed, or provide access to sufficiently detailed information to understand the level of access you’re consenting to?</p><p>In time, I’m confident that countless users will say that the either never knew, or never fully appreciated, what the app would do, or was asking for.</p><p>Now let’s consider the condition that apps can only “<em>‘</em><strong><em>show’ people their records, but won’t be able to store or share them.</em></strong>”. Will the government review the source code of every app to know that once the downloaded data is not stored — it has to be downloaded before it can be viewed?</p><p>I’d suggest that they won’t be given access to the source code, as it would contain intellectual property which the developer(s) don’t want to be viewed — <strong>for obvious reasons</strong>.</p><p>Alternatively, will the government test each app before it’s allowed to access the platform to check if it stores information locally? Depending on how the application’s developed, it might be impossible to know if this happens or not.</p><p>And to reiterate, the information <strong>must</strong> be downloaded so that the user can see it.</p><p>And here’s a third potential problem: as yet unknown architectural flaws. What if the user installs an app that, seemingly, had nothing to do with My Health Record? And what if that app was able to conduct <a href="https://en.wikipedia.org/wiki/Side-channel_attack">a side-channel attack</a> and extract and share information downloaded by a legitimate app?</p><p>It might seem a bit far-flung, but recent attacks such as <a href="https://meltdownattack.com/">Spectre and Meltdown</a> have indicated that these types of attacks are not only possible but that they can happen.</p><h3>Conclusion</h3><p>For The Time Time Being — <strong>Opt-Out.</strong></p><p>I know that My Health Record has the potential to be a significant improvement upon existing practices, such as faxing or emailing records between hospitals, organisations, and relevant government departments. And I’m sure that, if developed properly, it would allow medical professionals to do their work more effectively and efficiently.</p><p>However, given the security concerns, lack of documentation, and grey areas that I’ve covered in this post, along with <a href="https://twitter.com/search?src=typd&amp;q=MyHealthRecord">a significant number of other concerns that I’ve read through</a>, I’m far too concerned about the downside to opt-in for the potential upsides.</p><p>Perhaps you see it differently. Perhaps you feel that <a href="https://www.oaic.gov.au/privacy-law/privacy-act/">Australia’s existing privacy legislation</a> provides sufficient protections. If so, then make the choice that you’re most comfortable with.</p><p>For my own part, I’m opted out until I see these concerns answered and the documentation made much more specific.</p><p>Tagged with: My Health Record / Australian Government / Online Security / Cyber Security</p><p><em>Originally published at </em><a href="https://matthewsetter.com/myhealthrecord-do-the-risks-outweight-the-advantages/"><em>matthewsetter.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc404ac86aae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are We Too Trusting With Our Online Privacy?]]></title>
            <link>https://medium.com/@settermjd/https-medium-com-settermjd-are-we-too-trusting-with-our-online-privacy-d2bcab22195?source=rss-d8be98cdccce------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2bcab22195</guid>
            <category><![CDATA[online-privacy]]></category>
            <category><![CDATA[gossip]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[sharing]]></category>
            <category><![CDATA[privacy]]></category>
            <dc:creator><![CDATA[Matthew Setter]]></dc:creator>
            <pubDate>Wed, 02 May 2018 10:36:21 GMT</pubDate>
            <atom:updated>2018-05-02T19:18:46.560Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*ZrrDCMuzDEvfQSb4.jpg" /></figure><p><strong><em>This was originally published at </em></strong><a href="https://matthewsetter.com/why-are-we-so-trusting-and-open"><strong><em>matthewsetter.com</em></strong></a><strong><em>, on </em>May 1st, 2018.</strong></p><p>Have you ever stopped to wonder about just how trusting you are with your online privacy, and how much information you freely give away?</p><p>Have you ever thought how savvy you are in the modern era, but how naive your parents and grandparents were? I believe we could be living in a much more naive time now. Here’s why.</p><p>As I was researching last week’s post, on <a href="https://matthewsetter.com/can-you-trust-facebook-with-your-privacy/">whether we should still trust Facebook with our online privacy and personal data</a>, I was talking to my Mum. She said that she <em>really</em> liked the article (<em>go Mum!</em>) and that it reminded her of her Mum and her Mum’s attitude to sharing personal information.</p><p>She shared the following quote with me — <strong>that floored me!</strong> Have a read and see what you think.</p><blockquote><em>My mum lived in the day when a person connected phones through to the number you called and in small towns notoriously that person knew, and spread all the town news and gossip. Until the day she died, mum was very careful about what she discussed over the phone for fear of “ anyone could be listening in”. I fear she might have been right.</em></blockquote><p>I fear she may have been too, Mum. And to be honest, it makes me cringe more than just a little when I look back over how open and transparent I’ve been over the years.</p><p>I’m not saying that sharing facts about ourselves online is <em>necessarily</em> a bad thing, and that we shouldn’t share anything about ourselves. After all, sharing is a fundamental part of building and maintaining relationships with others. It helps makes us human. <strong>It helps makes us who we are</strong>!</p><p>However, when you share too much without stopping to consider the ramifications of doing so, it just may come back to haunt you at some point in the future. I hope for my sake that none of my previous sharing does. :-)</p><p><strong>What about you?</strong></p><p>Next time you’re asked, such as in a Facebook game, what your favourite comic character is, or the first street you lived in was, will you consider <em>not</em> sharing that information?</p><p><a href="https://www.flickr.com/photos/ironrodart/4154904299/in/photolist-7k9Yi2-bfLFHk-9uNR56-9uNQfa-fbc21Y-7Unejv-c6dR8j-emuPrT-78HxaW-gM8xKq-9yMWGo-bWhaH9-3ajXVu-7mmujZ-RDmAf2-i6yPvN-7yKiEj-9zxT76-abavKw-3ajXzm-7mNvbC-edLR3h-9d3LHi-9uRS6E-aDgfCe-opgBLj-9JQMp-58wnof-akiyeS-3P5Zo8-7wA5mb-opspA3-KjxkkF-GVV5yz-cwbDVu-9xKFSJ-7wA4Xh-9NUBAE-4bwDGq-cWLv4G-8368Fc-22C3agU-3eD8hR-opAQix-9CypMD-cZcLeW-7wwg7p-edFboR-u8595-7pbUTw">CC Image Courtesy of Royce Bair on Flickr</a></p><p><em>This post is dedicated to my Mum, and my two Grandmothers, who I still love very deeply.</em></p><p><strong>Categorised under:</strong> <em>privacy</em> | <strong>Tagged with:</strong> <em>sharing, online privacy, Facebook.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2bcab22195" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Can You Still Trust Facebook With Your Privacy?]]></title>
            <link>https://medium.com/@settermjd/https-medium-com-settermjd-can-you-still-trust-facebook-with-your-privacy-51e823aa39f0?source=rss-d8be98cdccce------2</link>
            <guid isPermaLink="false">https://medium.com/p/51e823aa39f0</guid>
            <category><![CDATA[gdpr]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[online-privacy]]></category>
            <dc:creator><![CDATA[Matthew Setter]]></dc:creator>
            <pubDate>Thu, 26 Apr 2018 07:57:48 GMT</pubDate>
            <atom:updated>2018-04-26T07:58:23.843Z</atom:updated>
            <content:encoded><![CDATA[<h3>Can You Still Trust Facebook With Your Privacy &amp; Data?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/0*ZVPRRHWZd6t2jqAw.png" /></figure><p><em>This was originally published at </em><a href="https://matthewsetter.com/can-you-trust-facebook-with-your-privacy"><em>matthewsetter.com</em></a><em>.</em></p><p>In light of the recent Cambridge Analytica / Facebook scandal Mark Zuckerberg testified before the US Congress. Did you tune in to hear what he said about what they knew? Were you keen to know more and about how they might be planning to protect your privacy in the future?</p><p>I was certainly keen to hear <a href="https://www.cnbc.com/2018/04/09/congress-released-mark-zuckerbergs-prepared-testimony-ahead-of-wednesdays-hearing.html">what he had to say</a>. With over 2 billion users, Facebook is the largest social media platform in the world; the actions that they take are important, and have wide-ranging consequences.</p><p>I have to be honest though, while I wasn’t surprised by what I heard, I still came away feeling somewhat disappointed. And as I listened to the testimony, I became a little concerned.</p><p>Mark hardly gave a straight answer to any of the questions, and his few conclusive responses were lost, I felt, in many half answers, and broad, somewhat innocuous statements.</p><h3>However, Let’s Put It In Greater Context</h3><p>To be fair to Mark — <em>despite his power and influence within Facebook, the tech community, and the wider business world</em> — the rules are completely different when you’re facing the US congress. If the rules are anything like they are in Australia, you don’t have much power.</p><p>I’m not entirely familiar with the legal situation in the United States. However, some colleagues have advised me on <a href="https://www.facebook.com/settermjd/posts/1675638289192750">a recent post on my Facebook page</a>, that he does have to be quite careful with what he says, as it may be used against him far into the future.</p><p>Whereas for the politicians, they have quite a lot of liberty to make accusations and assertions, even some that are incredibly specious at best. Compounding that problem, I noted several others. The first is that a number of them didn’t seem all that apprised of how Facebook or social media platforms work.</p><p>The next is that some didn’t come across as all that tech savvy to begin with. Moreover, the third is that each only had about 4 minutes to ask questions. That’s barely enough time to form a proper question, while also providing sufficient background context, along with additional meaning if required.</p><p>So the entire environment seems imperfect all round. Regardless, that was the state of play. Given all of these, and no doubt many more factors, it’s entirely understandable that Mark Zuckerberg would be careful about what he divulged at the hearing.</p><p>Add to that the amount of heat that’s on the company at the moment, and I’d suggest that it’s only logical to expect that this outing is more about saving the company’s reputation and limiting the fall out more than anything else.</p><p>When you put all of that together, what we heard seemed to be only a set of well thought out and rehearsed talking points, ones designed to create the impression that the company:</p><ol><li>Is genuinely sorry for what has happened and for the mistakes that they made</li><li>That they will do all that they can to do better in the future — <em>ideally avoiding it happening again</em>.</li></ol><p>And let’s be honest, most companies would likely operate similarly, if they were in the same position. So, similar to <a href="http://www.abc.net.au/news/2017-11-30/banking-royal-commission-how-did-we-get-here/9210248">the banking royal commission in Australia</a>, it doesn’t make sense to either pre-empt anything or to attempt to rush change prematurely.</p><p>As I’ve never worked at Facebook, nor at the upper levels of the company, nor know anyone who does or has, there’s no way that I can know anything about the discussions and goings on there regarding the platform, their attitude, and their data protection and privacy policies.</p><p>Despite all this, I’ve been feeling uneasy about what I heard. Yet feelings are notoriously unreliable things, so I decided to do a little bit of digging, to see what else I could find out about Facebook, and how it works.</p><p>Hopefully, but understanding the company in a more significant context, it could answer some of the lingering questions that I had.</p><p>In this post, I want to share some of that research with you and discuss several questions that I have. I’d love to hear your thoughts about them in the comments below.</p><h3>Why Didn’t They Notify 87 Million Users That Their Personal Data Was Breached?</h3><p><a href="https://www.politico.com/story/2018/04/10/zuckerberg-senate-testimony-facebook-key-moments-512334">According to Politico</a>, Facebook first learned about the breach of up to 87 million users’ data around 2015. In addition to that, Facebook made a conscious decision not to inform users about the breach.</p><blockquote><em>Zuckerberg also said he didn’t remember when Facebook made the decision not to inform users that their data had been breached and that he didn’t remember being involved in the conversation where the decision was made.</em></blockquote><p>What’s more, when the scandal publicly broke, instead of providing a public update they said nothing for a further week. Now let’s consider another point. According to Politico, when Facebook learned of the breach, they approached Cambridge Analytica and asked them to remove the breached data.</p><p>What they did not do was an audit to ensure that the information was removed. Apparently, they accepted Cambridge Analytica’s word that it was addressed.</p><p>Now let’s consider Mark’s response when asked about the situation. During his testimony to the US Congress, he said:</p><blockquote><em>We didn’t take a broad enough view of our responsibility, and that was a big mistake,” he added. “It was my mistake, and I’m sorry. I started Facebook, I run it, and I’m responsible for what happens here. It will take some time to work through all of the changes we need to make,” he added, “but I’m committed to getting it right.</em></blockquote><p>Sounds good, doesn’t it, but words aren’t the same thing as actions. Stop for a moment and consider all of these points individually, and then collectively. Consider how you’d feel — <em>and what you’d do</em> — if your bank, credit reporting agency, or insurance company had such a large proportion of their accounts breached and said nothing.</p><p>How would you feel if they both knew about it, but made a conscious decision not to inform anyone, then, when it all came to light they went quiet for another week. What would that do to your perception of them?</p><p>The information that banks, credit reporting agencies, and insurance companies, among others, is different to what Facebook holds. This is still private data, entrusted by users to Facebook. So while it may appear that the comparison’s ill-suited, there’s a measure of comparison which can be afforded.</p><p>I don’t want to single out Facebook’s handling of the breach, nor their delay in acknowledging it as being unique. Of all the high profile cases of recent years, we only have to look at Yahoo!</p><p>While <a href="https://blog.sqreen.io/security-year-in-review/">they publicly acknowledged</a> in 2016 that up to 1 billion accounts had been compromised, that breach dated back as far as 2012 or 2013.</p><p>We later found out that not only had up to 1 billion accounts been breached but that all Yahoo! accounts had. On top of that, we could look at a variety of other companies, including <em>Ashley Madison</em>, <em>AdultFriendFinder</em>, <em>Telegram</em>, and <em>BitFinex</em>.</p><p>Facebook’s hardly unique here. I want to think that, with the relationship that they’ve worked to build up over the years, that they’d have handled the situation better, but they’re not alone.</p><h3>Why Fight Regulation Designed to Improve Users’ Privacy?</h3><p><a href="https://www.theguardian.com/technology/2018/apr/19/facebook-moves-15bn-users-out-of-reach-of-new-european-privacy-law">According to The Guardian</a>, Facebook recently shifted the responsibility of more than 1.5 billion users (<em>all Facebook users outside of the US and Canada</em>) to their Californian offices.</p><p>That’s significant, because the new EU privacy regulation framework, <a href="https://en.wikipedia.org/wiki/General_Data_Protection_Regulation">the GDPR</a>, is set to come into effect on May 25, 2018.</p><p>So they’ve moved more than 1.5 billion users from a jurisdiction where privacy regulations are set to become much stronger, to one where they’re weaker? If you were really committed to user privacy and “<em>getting it right</em>”, why make that move?</p><p>Let’s consider some potential reasons.</p><ul><li>Given the scale and reach of their platform (<em>over 2 billion users around the world</em>), are they not ready yet — despite having since 2014 to begin preparing for it?</li><li>Are they not ready for fines of <strong>up to 4% of global turnover</strong> (or around $1.6bn), if they’re found to be in violation of the GDPR?</li><li>Is the cost of moving the users less than the cost of one or several violations?</li><li>Is it easier and less costly to comply with one regulatory framework, rather than several simultaneously?</li><li>Is it easier to consolidate all their users under one regulatory framework, until a newer, foreign framework has been fully established and is more widely understood? <em>Until the GDPR is in effect and better understood — and tested — it’s likely a sane choice to consolidate, wait, and see</em>.</li></ul><p>Any one of these or several of them are rational, logical, and pragmatic.So while the timing could be justifiably seen as conspicuous, it needn’t be.</p><p>However, <a href="http://fortune.com/2018/04/19/facebook-facial-recognition-gdpr-eu/">according to Fortune</a>, on April 19, 2018, the move may have to do with Facebook’s re-introduction of facial recognition for European users and the fact that it may be illegal under the GDPR. According to the article:</p><blockquote><em>The Irish DPC has jurisdiction over Facebook because its international services all run out of its Irish headquarters — all users outside North America currently agree to the terms of services coming out of that office.</em></blockquote><p>Now consider that in tandem with the fact that:</p><blockquote><em>The Irish DPC is querying the technology around facial recognition and whether Facebook needs to scan all faces (i.e., those without consent as well) to use the facial recognition technology. The issue of compliance of this feature with GDPR is therefore not settled at this point.</em></blockquote><p>It would <em>seem</em>, given the timing of the move and the outstanding nature of the technology concerning the GDPR, that the decision to move the users away from the Irish DPC’s jurisdiction has more to do with being able to re-introduce facial recognition in Europe than any of the other potential reasons.</p><p><strong><em>What do you think?</em></strong></p><h3>Why Fight the Strongest Privacy Legislation in the US?</h3><p>This legislation is called <a href="http://itlaw.wikia.com/wiki/Biometric_Information_Privacy_Act">the Biometric Information Privacy Act (BIPA)</a>, which requires explicit consent before companies can collect biometric data like fingerprints or facial recognition profiles. If they were genuine in wanting to do better would it not be logical to:</p><ul><li>Take advantage of the introduction of the legislation to show just how genuinely committed they are</li><li>Ensure that they were prepared for it as soon as possible and that new user controls were as transparent and straightforward as possible?</li></ul><p>Unfortunately, <a href="https://www.theverge.com/2018/4/10/17218756/facebook-biometric-privacy-lobbying-bipa-illinois">according to The Verge</a>, they’ve been quietly lobbying for an amendment to the proposed legislation which:</p><blockquote><em>Allows companies to collect biometric data without notice or consent as long as it’s handled with the same protections as other sensitive data. Companies could also be exempted if they do not sell or otherwise profit from the data, or if it is used only for employment purposes.</em></blockquote><p>To be more specific, according to the post, Facebook isn’t actively or directly lobbying for the watering down of the law. However, it notes that they’re an active member of the <em>Illinois Chamber of Commerce’s Tech Council</em>, which is.</p><p>Whereas the move of over 1.5 billion users could have any number of pragmatic reasons for being carried out, this one seems to have less room for doubt.</p><p>However, let’s look deeper. Facial recognition is a reasonably new area of modern technology. Given that, the implications of being able to scan, store, and track people is far less understood, than something such as fingerprints or metadata.</p><p>Moreover, like anything new, it’s been used by corporations and organisations long before people are fully aware of it happening, the consequences and implications of it have become modestly known, and any legal framework has had a chance to keep pace.</p><p>As a result, it’s logical to expect three things:</p><p>However, on this matter, I agree with a statement by a group of privacy advocates, including <em>the Electronic Frontier Foundation</em> (EFF) and the <em>American Civil Liberties Union</em> (ACLU), which <a href="https://www.dailydot.com/layer8/google-apple-facebook-facial-recognition-talks/">The Daily Dot reported on back in 2015</a>:</p><blockquote><em>At a bare minimum, people should be able to walk down a public street without fear that companies they’ve never heard of are tracking their every movement — and identifying them by name — using facial recognition technology. Unfortunately, we have been unable to obtain agreement even with that basic, specific premise.</em></blockquote><p>Now some of the referenced articles are a few years old, and deliberately so. I’ve done that to consider a before and after perspective. Now let’s look at what has changed at Facebook in recent years.</p><p>Recently, <a href="http://fortune.com/2018/04/19/facebook-facial-recognition-gdpr-eu/">they re-introduced facial recognition for European users</a>, after it was removed because of privacy concerns 5–6 years ago. This might sound concerning if you’re against it, but according to Facebook spokesperson Rochelle Nadhiri, the feature is off by default.</p><p>However, <a href="https://www.wired.com/story/how-to-turn-off-facebook-face-recognition-features/">Wired reports</a> that it’s not quite that cut and dry:</p><blockquote><em>The new setting respects people’s existing choices, so if you’ve already turned off tag suggestions, then your new face recognition setting will be off by default. If your tag suggestions setting was set to ‘friends’, then your face recognition setting will be set to on.</em></blockquote><p>So, it’s not a clear opt-in or a yes or no situation. If you’re not aware of the implications of tagging, then it’s reasonable to expect that you’d be confused to find that facial recognition was already enabled when you’d not explicitly chosen to opt-in.</p><p>Moreover, with a feature as pervasive as this could become, or already may be, this needs to have a clear-cut choice to opt in or out.</p><p>Now, while this may seem concerning, at least Facebook, while not completely clear with their notifications about the introduction of facial recognition, are evident that they’re rolling it out again.</p><p>This stands in stark contrast to Westfield shopping centres (Australia). <a href="http://www.news.com.au/finance/business/retail/westfield-is-using-facial-detection-software-to-watch-how-you-shop/news-story/7d0653eb21fe1b07be51d508bfe46262">According to a report in October, 2017</a>:</p><blockquote><em>Every time you walk into a Westfield shopping centre you are being tracked. Sophisticated facial detection software, working in conjunction with the devices you are carrying on you, are monitoring your mood and tracking your every move. The company uses small cameras fixed atop advertising screens, that detect individual faces in order to record the age, gender and mood of shoppers. Westfield also tracks shoppers’ movements by pinging their Wi-Fi enabled devices with routers littered across its centres.</em></blockquote><p>The report went on further to say that specific consent isn’t required as “<em>the Privacy Act 1988 only regulated the collection of personal and sensitive information</em>”.</p><p>At least Facebook let’s you know what they’re doing, even if you have to do some digging and be somewhat savvy to appreciate the full ramifications of the choices that you’re provided with.</p><p>Besides, if you want to opt out at any time, a little googling is all it takes to find out how — even if the process is somewhat convoluted.</p><h3>Why Give $200,000 to Help Fight Against Increased Privacy Controls?</h3><p>Now let’s consider a third political lobbying effort. <a href="https://www.nbcnews.com/news/amp/ncna865726">According to NBC News</a>, back in February of this year, Facebook gave $200,000 to <em>The Committee to Protect California Jobs</em>. Why’s this significant? Because the committee is:</p><blockquote><em>A business-backed political action group dedicated to defeating a state ballot initiative that would expand Californians’ privacy controls.</em></blockquote><p>If Facebook were keen to do better, why actively support a group that’s actively lobbying to avoid improving privacy controls for users? Would you not put support behind already existing groups that were working to improve privacy?</p><p>To be fair, the article goes on to report that Facebook has since pulled support from the committee, because:</p><blockquote><em>We took this step in order to focus our efforts on supporting reasonable privacy measures in California.</em></blockquote><p>However, they still gave the money earlier this year, not years ago. As a nod to them though, they have stated that they would adopt the recommendations of <a href="https://www.nbcnews.com/tech/social-media/facebook-announces-major-changes-political-ad-policies-n863416">the Honest Ads Act</a>, which seeks to regulate online political advertising.</p><p>Next, I want you to think about two points that an article in <a href="http://www.spiegel.de/netzwelt/web/cambridge-analytica-auch-menschen-ohne-facebook-konto-haben-ein-problem-a-1203529.html">Der Spiegel</a> (German) shared recently:</p><ol><li>We put our online data there ourselves.</li><li>We love to vicariously enjoy the intimate details of the lives of others (e.g., <em>royals</em>, <em>celebrities</em>, and <em>politicians</em>, etc.), but we don’t like it when the details of our own lives are shared.</li></ol><p>While Facebook does use, and has the power to abuse our data, we do, willingly, hand a lot of it to them in the first place. Now let’s dive down the rabbit hole just a little bit further. Let’s say you willingly give Facebook (or any other social network or organisation) your data.</p><p>Then, let’s say you give “<em>friends of friends</em>” access to your data so that your friends’ friends can see and comment on your data, or your friends can share your thoughts and posts with their friends. And when all that’s in place, let’s say that you have a friend who then grants an advertiser access to that data.</p><p>How should Facebook handle it? Consider that you have expressly given that friend access to that data and then that friend has explicitly given access to that data to the advertiser. You could say that, technically, Facebook is just doing what you have expressly allowed them to do with your data.</p><p>This is what bothers me about how social media platforms work and how our lack of understanding about them can lead to situations that we genuinely don’t expect or appreciate.</p><p>Given the change of events that I just described, it’s reasonable for Facebook to assert that you allowed them to do what they did. At the same time, it’s reasonable to expect that the average user may not fully appreciate what they’re consenting to.</p><p><strong><em>Chew over that for a moment or two.</em></strong></p><h3>That’s a Wrap</h3><p>There’s a lot to consider around the use of our personal data, how social media platforms (and other companies) collect, analyse, and user our data, and what that means for our privacy in the modern age.</p><p>And this article, even if it were twice or three times as long, couldn’t hope to discuss it, nor Facebook’s motivations or actions, in sufficient detail.</p><p>However, I hope that by pulling more threads together, you are in a more informed position, and able to make a more informed choice about how you approach using Facebook and other sites in the future.</p><p>Are you going to close your Facebook account? Are you going to continue as before? Alternatively, are you going to take a more considered view as to how you use it, what you share, like, and comment on?</p><p><strong>Have you reviewed </strong><a href="https://www.facebook.com/help/325807937506242/"><strong>your privacy settings</strong></a><strong>, and locked them down as much as you can? If you haven’t, I strongly urge you to do so!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51e823aa39f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Avoid Being Tracked Online? Ditch Google For DuckDuckGo]]></title>
            <link>https://medium.com/@settermjd/https-medium-com-settermjd-avoid-being-tracked-online-ditch-google-for-duckduckgo-5d4da6eb2d48?source=rss-d8be98cdccce------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d4da6eb2d48</guid>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[online-privacy]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[duckduckgo]]></category>
            <dc:creator><![CDATA[Matthew Setter]]></dc:creator>
            <pubDate>Fri, 20 Apr 2018 07:02:43 GMT</pubDate>
            <atom:updated>2018-04-20T07:05:53.961Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HiBEXImUbQp2ZZ8YXjqwZg.png" /></figure><p>Do you ever wonder just how much information Google is storing and sharing about you, all so that they can give you those search results?</p><p>Ever felt like you were being tracked online, all so that you could do some simple searches? Well, it’s time to consider alternatives to Google, ones that give you great search results, but that don’t invade your privacy.</p><h3>Why You Should Ditch Google</h3><p>We’re all familiar with Google. It’s not only a household name, it’s also a modern verb! We no longer search online anymore. We <em>google</em> for things.</p><p>And that’s entirely understandable. Because depending which <a href="https://www.statista.com/statistics/216573/worldwide-market-share-of-search-engines/">report</a> you read, Google accounts for <strong><em>as much as 87% of all internet searches</em></strong>. It’s also referenced in popular culture.</p><p>Moreover, despite efforts by alternative search engines — most notably <em>Microsoft Bing</em>, which only has 5.2% market share — no one’s ever managed to gain any amount of meaningful traction on Google’s dominance. I don’t know of anyone who <em>bings</em> anything. Do you?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FnfHuZ5qrYX4%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnfHuZ5qrYX4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FnfHuZ5qrYX4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e0d19399441430626ed59ea0793ebc77/href">https://medium.com/media/e0d19399441430626ed59ea0793ebc77/href</a></iframe><p>For the longest time, this setup seemed all fine and dandy. You opened up your browser, which defaulted to Google’s home page, did some quick searching, found what you wanted to learn, do, or buy, and did it. Happy days! <em>Right?</em></p><p>However, in recent years that’s begun to change. People have been feeling that <a href="http://www.wired.co.uk/article/google-history-search-tracking-data-how-to-delete">they’re being tracked online</a>. Perhaps you have. As a result, we’ve started learning about how Google is able to provide such high-quality search results Moreover, what we’ve found is more than a bit concerning.</p><p>Here’s an example; you search for something in Google, perhaps a new vacuum cleaner. Perhaps you buy it; perhaps not.</p><p>Then, as you visit other sites, you notice that the advertisements being displayed on those sites have an uncanny relationship with your recent vacuum cleaner search history.</p><p>Now some would argue that there isn’t necessarily anything sinister nor big brother going on here. The reason why Google’s able to provide such excellent results — and why other sites know what to suggest to you —<strong><em> is because </em></strong><a href="https://krebsonsecurity.com/2018/04/dont-give-away-historic-details-about-yourself/"><strong><em>you’ve willingly given away</em></strong></a><strong><em> enough information already!</em></strong></p><p>However, that’s not the whole story. And there’s more than an element of truth in the fact that:</p><ol><li>Google does store significant amounts of data about you; <em>and</em></li><li>That information is used to enhance their search results and those of their partners.</li></ol><p>Have you been feeling the same way? If so, then it’s time to do something about it! It’s time to find an alternate search engine, one that still gives you excellent search results yet also respects your privacy.</p><p>You might be forgiven for believing that you can have one, but you can’t have both, but you’d be wrong. In recent years, enough people have been feeling the same way that you have, so much so that decent alternatives not only exist, but they’re getting even better.</p><p>So in this two-part series, I’m going to introduce you to two of them that I’ve been experimenting with recently; these are <a href="https://duckduckgo.com/">DuckDuckGo</a> and <a href="https://www.qwant.com/">Qwant</a>. In this, the first part, we’ll start off with DuckDuckGo. And next week, we’ll finish up with Qwant.</p><p>Yes, there are others, but I don’t have sufficient experience with them to speak confidently or authoritatively about them, to recommend them. However, if you can, please do so in the comments.</p><h3>What is DuckDuckGo?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BfGoK0pbcKZVYi9Q.png" /></figure><p>Despite the name, it’s a genuine service, one I’ve been happily using for the last four weeks. To quote their website:</p><blockquote><em>DuckDuckGo is an Internet privacy company that empowers you to seamlessly take control of your personal information online, without any trade-offs. With our roots as the search engine that doesn’t track you, we’ve expanded what we do to protect you no matter where the Internet takes you.</em></blockquote><p>What’s more:</p><ol><li>They donate to several privacy-focused organisations, such as <a href="https://www.eff.org/">the Electronic Frontier Foundation (EFF)</a>, <a href="https://riseup.net/">Riseup</a>, and <a href="https://f-droid.org/">F-Droid</a>, as well as to many notable open source projects, including <em>NGINX</em>, <em>FreeBSD</em>, and <a href="https://www.torproject.org/">the Tor Project</a>.</li><li>They have a mobile app and a browser extension.</li><li>They provide <a href="https://spreadprivacy.com/">privacy education</a>.</li></ol><p>I loved it when I first heard about it. In short, it’s a search engine that doesn’t track you and helps educate you about online privacy. <em>What a concept!</em></p><p>How do they do that, you may be asking? Firstly, according to <a href="https://duck.co/help/privacy/no-tracking">their official documentation</a>, they don’t store:</p><ul><li>Your search history</li><li>Your IP address; or</li><li>Any details about the user agent that you used (usually your web browser).</li></ul><p>Secondly, when you click on a search result, they don’t send the linked site the search term(s) you used, nor your IP address, nor any details of your user agent.</p><p>This is important because, without this information it’s much harder to create a browser fingerprint. If you’re not sure what that is, <a href="https://wiki.mozilla.org/Fingerprinting">a browser fingerprint</a> is analogous to your physical fingerprint; it’s something that uniquely identifies you online.</p><p>If someone knows your IP address, then they have a pretty fair idea of where you were when you searched. If you extract details about your browser, it’s even more telling. This can include details such as:</p><ul><li>Which one it is (<em>Firefox</em>, <em>Safari</em>, <em>Google Chrome</em>).</li><li>Its version number.</li><li>Your device’s screen resolution.</li><li>Whether you’re using a desktop or mobile device, what it is, and its version number.</li><li>The plugins you’re using and whether they’re active or not, etc.</li></ul><p>From all of this information, <em>and more</em>, you can be pretty sure that:</p><ol><li>You’ve got the same user</li><li>You can watch where they go, and from that information, you can get a pretty clear idea of where they go on a regular basis.</li></ol><p>I don’t want to freak you out though, but <a href="https://www.matthewsetter.com/becoming-a-security-focused-developer/#civil-liberties%2C-privacy%2C-and-anonymity-are-under-threat">it’s something that really frustrates me</a>, and I hope you too. Safe to say, without this information your time online is a lot more secure.</p><p>With all that said, let’s consider a further three reasons why you’d use it instead of Google.</p><h3>One: You Know Your Privacy Level</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WH-gWLnOulRuxXSK.png" /><figcaption>The DuckDuckGo Privacy Essentials extension for Firefox.</figcaption></figure><p>Whether you install the app, the browser extension (Firefox and Safari), they show you your privacy grade. This shows you how much a site can be trusted, both before and after DuckDuckGo’s Privacy Protection service is applied.</p><h3>Two: It Forces Sites to Use Encrypted Connections</h3><p>It forces sites to use encrypted connections (<a href="https://www.troyhunt.com/i-wanna-go-fast-https-massive-speed-advantage/">HTTPS</a>) when they’re available. By using encrypted connections, you protect yourself from attack vectors, such as <a href="https://en.wikipedia.org/wiki/Man-in-the-middle_attack">MitM (Man in the Middle) attacks</a>, along with, seemingly innocent alterations to your browsing sessions.</p><p>Have a look at this one, <a href="https://twitter.com/troyhunt/status/956253484675985409">reported by Troy Hunt</a> some time ago. Have a look at the URL, and see what shouldn’t be there.</p><p>The DuckDuckGo tracker blocker stops advertisers from tracking you on the sites you visit. Take the example below, where it blocked <em>Google</em>, <em>Amazon</em>, <em>Nielsen</em>, <em>comScore</em>, <em>Krux</em>, and several others, during a quick visit to The Guardian.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/0*kdGmyYR4xO0PsKs4.png" /><figcaption>DuckDuckGo’s Privacy Essentials extension showing blocked tracker networks.</figcaption></figure><h3>There is a catch!</h3><p>Now, these are solid reasons to use it. However, there’s another side to the story. The privacy that DuckDuckGo affords you only extends to online tracking and advertisers.</p><p>If, however, an organisation such as the NSA were to demand access to DuckDuckGo’s servers and get the SSL certificate, then they could then un-encrypt all of the communication with their servers. However, that’s a conversation that I’m going to leave for another time.</p><p>For now, we’re going to stay focused on helping you browse more privately online, so that it’s much harder for advertisers to track you around the internet, and potentially manipulate you or to target their advertising to you too specifically.</p><h3>What do you think?</h3><p>Like what you’re hearing? Want to give it a try? Well, no matter if you’re using Safari on macOS or iOS, or Firefox on Windows, Linux, or Android, in a few short minutes, you can.</p><h3>Change Your Browser’s Default Search Engine</h3><p>If you’re short on time, watch the short video below.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FYKhgvuZWA08%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DYKhgvuZWA08&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FYKhgvuZWA08%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a457313c7632e6d9b747f5fe44b5055/href">https://medium.com/media/1a457313c7632e6d9b747f5fe44b5055/href</a></iframe><p>Otherwise, here’s a step-by-step guide to show you how to change your browser’s default search engine.</p><h3>Firefox</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wnr60OKFPbAHqJY4.png" /><figcaption>Changing Firefox’s default search engine.</figcaption></figure><p>In Firefox open “<em>Preferences</em>”, then click the “<em>Search</em>” tab. Then, under “<em>Default Search Engine</em>”, choose “<em>DuckDuckGo</em>” from the drop-down list.</p><h3>Google Chrome</h3><p>In Chrome, yes, Google Chrome, under settings, scroll down till you come to “<em>Search Engine</em>”, then click “<em>DuckDuckGo</em>” from the list. With these changes made, any searches that you go through the address bar are sent to DuckDuckGo instead of Google.</p><h3>Safari</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cpoJO4wUN2uhz_8M.png" /><figcaption>Changing Safari’s default search engine.</figcaption></figure><p>In Safari’s settings, click the “<em>Search</em>” tab, then in the Search Engine drop-down, click “<em>DuckDuckGo</em>”. It’s been there since late 2014.</p><h3>Install the Browser Extension</h3><p>Now let’s go further, and install the <a href="https://spreadprivacy.com/privacy-simplified/">DuckDuckGo Privacy Essentials add-on</a> for both Firefox and Safari. We’ll start off with Firefox. Open the configuration menu, and choose “<em>Add-ons</em>”, then click “<em>Extensions</em>” in the left-hand side navigation menu.</p><p>Once there, add “<em>DuckDuckGo Privacy Essentials</em>” in the search bar, and click return (or enter). When it appears in the search results, click “<em>Install</em>”.</p><p>Now for Safari; open <a href="https://safari-extensions.apple.com/">https://safari-extensions.apple.com</a> in Safari, and search for (again) “<em>DuckDuckGo Privacy Essentials</em>”. You’ll see one result appear. Click the “<em>Install now</em>” link to install the extension.</p><h3>Let’s Test it Out</h3><p>When you’ve installed the extension in both browsers, you’ll see a new toolbar icon appear, showing the DuckDuckGo logo. As it’s ready, it’s time to test it out. And what better way, than to eat your own dog food, and test it out on my freelance website, which you can see that I’ve done in the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JqRK8DqqVPVvUZ8P.png" /><figcaption>Viewing a site’s privacy grade with DuckDuckGo’s Privacy Essentials extension.</figcaption></figure><p>When I did this test, I was a little surprised, to be honest; not entirely, but a little. I wouldn’t have thought I’d get a ‘<em>D</em>’ rating. However, at least it’s upgraded it to a ‘<em>B</em>’.</p><p>Let’s dig in and find out why my website got such a low rating, and what was changed to improve it. The encrypted connection was already there, as I use an SSL certificate from Let’s Encrypt to serve the site only over HTTPS.</p><p>Now let’s look at the blocked trackers. If you open that section, you can see that the top offenders are <em>Twitter</em>, <em>Google</em>, <em>AddThis</em>, and <em>Disqus</em>.</p><p>That’s hardly surprising, as I try and make it easy to share content on Twitter and Google (I’m not entirely against these sites), and Disqus is the comment engine, which I love most of all the comment engines available at the moment.</p><p>What surprised me, however, are that these aren’t the only ones. Trackers from <em>VigLink</em>, <em>BrightTag</em>, <em>BlueKai</em>, <em>eXelate</em>, and <em>AppNexus</em> were also blocked. I’ll be honest, I’ve never heard of any of these, and have no idea what they are.</p><p>I can only assume that they were bundled in as part of the plugins that I’ve used — plugins that I’ll be eagerly reviewing by the time you read this.</p><p>Now for the third and final part, Privacy Practices. It’s given me a rating of “<em>Unknown Privacy Practices</em>”. Interesting. What exactly does that mean?</p><p>Let’s find out. At the bottom of that section, you can click a link that takes you to <a href="https://tosdr.org/">https://tosdr.org/</a>, which is “Terms of Service, Didn’t Read”. Having a quick read through <a href="https://tosdr.org/about.html">their About page</a>, here’s what the site is about:</p><blockquote><em>“Terms of Service; Didn’t Read” (short: ToS;DR) is a young project started in June 2012 to help fix the “biggest lie on the web”: almost no one reads the terms of service we agree to all the time.</em></blockquote><p>Makes sense to me. Though I’ve tried to be more diligent about actually reading Terms of Service, given all the apps and services that I use on a regular basis, it’s nigh-on impossible.</p><h3>Install the App</h3><p>Okay, we’ve changed your search engine, and we’ve installed the browser extension. Now, let’s go the final step and install the app. It lets you browse with complete privacy confidence. Using an iOS device? <a href="https://itunes.apple.com/us/app/duckduckgo-search-stories/id663592361?platform=iphone&amp;preserveScrollPosition=true#platform/iphone">Download it here</a>. Using an Android device? <a href="https://play.google.com/store/apps/details?id=com.duckduckgo.mobile.android">Download it here</a>.</p><h3>Is Google Really Evil?</h3><p>Before we finish up, I want to be clear that I’m not saying that Google is evil or that you should never use it again. What I am saying, however, is that it’s not the only game in town and that you should strongly consider whether it’s the right one for you.</p><p>If, after reading through this post and the linked articles, you’re still comfortable using it, knowing what you know now, at least you’ve made an informed choice. However, if you want to change, then options await you.</p><h3>In Conclusion</h3><p>I have to be honest, while I love DuckDuckGo, it’s not quite as feature-rich as Google. However, then, if they don’t have the resources that Google has, nor are as old (<em>DuckDuckGo was founded back in 2008</em>), then that’s understandable. Despite that, however, it’s still a competent search engine.</p><p>What do you think? Are you willing to try it out? Have you made the switch already? What’s your experience been like? Please share your thoughts in the comments below.</p><h3>Coming up next?</h3><p>Now that you’ve learned about DuckDuckGo, in next week’s post, I’m going to step you through another alternative, perhaps a better one — Qwant. See you then.</p><p><em>Originally published at </em><a href="https://www.matthewsetter.com/ditching-google-for-duckduckgo"><em>www.matthewsetter.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d4da6eb2d48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Configure Pagination in Sculpin]]></title>
            <link>https://medium.com/@settermjd/how-to-configure-pagination-in-sculpin-80ee89c46c99?source=rss-d8be98cdccce------2</link>
            <guid isPermaLink="false">https://medium.com/p/80ee89c46c99</guid>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[getsculpin]]></category>
            <category><![CDATA[self-publishing]]></category>
            <category><![CDATA[static-site-generator]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Matthew Setter]]></dc:creator>
            <pubDate>Wed, 07 Feb 2018 11:28:51 GMT</pubDate>
            <atom:updated>2018-02-07T11:29:35.361Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/652/0*E21TywT8F0GmLE_b.jpg" /></figure><p>If you use Sculpin, the excellent PHP-based static site generator, it may not be obvious as to how to configure pagination. In this article, I’ll step through how.</p><p>By default, <a href="https://sculpin.io/">Sculpin’s</a> global paginator will render up to ten items per page, if there are at least ten items available to be rendered. If that suits your needs, then you won’t need to change the setting. However, if, like me, you need to change the setting, then it’s good to know how to do it.</p><p>It’s something I’ve meant to do for some time now but never got around to finding out how to do. If you look at the image below, you’ll see why.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TPvnxqZzfJ7bNV2R.png" /></figure><p>There are ten records rendered with the tenth trailing off at the end of the page. I’ve always been one for aesthetics and a professional appearance, so have always felt that having an even set of rows renders better, as in the screenshot below. Much better, don’t you think?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eCE0DwjZpE_eQ7wN.png" /></figure><p>So if you’re in a similar position, how do you do it? It turns out that it’s not that hard at all. All you need to do is add a setting in app/config/sculpin_kernel.yml, which I&#39;ve included a sample of below.</p><pre>sculpin_pagination: max_per_page: 12</pre><p>As you can see, there’s not much to it. You first define a new configuration section, sculpin_pagination, and then in it set a value for max_per_page. After saving the file, if you run either the generate or publish script, your site will then render up to twelve items per page when paginating records (assuming you&#39;ve set it to 12).</p><h3>Configuring Pagination For Individual Content Types</h3><p>That’s how to do it on a global level, what about for individual content types? Good question. Gladly it’s straightforward to do.</p><p>In the template that you use to render a specific content type, in the YAML front-matter, you can add a configuration which is quite similar to the configuration which we’ve just seen.</p><p>The only difference is that instead of using the category sculpin_pagination, use pagination, as in the following example. Then, in it, set max_per_page as we did previously.</p><pre>pagination: max_per_page: 3</pre><p>Again, after saving the configuration and running either the generate or publish script, that content type will render a new maximum number of records. All other content types will be unaffected.</p><h3>And That’s a Wrap</h3><p>If you’re thinking of migrating away from your current blog or website backend to a static site generator and you want to know anything more about Sculpin, then <a href="https://sculpin.io/">check out its documentation</a>. If you are already using Sculpin and have any tips or suggestions to share, please do so in the comments.</p><p><strong><em>Originally published at </em></strong><a href="https://www.matthewsetter.com/configure-sculpin-pagination"><strong><em>www.matthewsetter.com</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80ee89c46c99" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Static Code Analysis Helps You Rapidly Fix Software Vulnerabilities]]></title>
            <link>https://medium.com/hackernoon/how-static-code-analysis-helps-you-rapidly-fix-software-vulnerabilities-7b45498cedfb?source=rss-d8be98cdccce------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b45498cedfb</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[weekly-sponsor]]></category>
            <category><![CDATA[static-code-analysis]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Matthew Setter]]></dc:creator>
            <pubDate>Mon, 08 Jan 2018 18:43:43 GMT</pubDate>
            <atom:updated>2019-05-14T04:44:22.218Z</atom:updated>
            <content:encoded><![CDATA[<h3>Shortcuts to Learning Kotlin</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QkqXaMjLkqCJG9OIwUjvGQ.png" /></figure><h3>How the $170 million Ethereum bug could have been prevented</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*zFLiB17cCsdQIrOV5MDo8g.png" /></figure><blockquote>Disclosure: <a href="https://goo.gl/s8fRSz"><strong>Codacy</strong></a>, the automated code reviews platform, has previously sponsored Hacker Noon. For Hacker Noon readers, they’re <a href="https://goo.gl/s8fRSz"><strong>offering 15% off using this code: HACKERNOON</strong></a><strong>.</strong></blockquote><p>There have been a spate of high profile <a href="https://hackernoon.com/tagged/security">security</a> breaches in recent years. These include <a href="https://blog.sqreen.io/security-year-in-review/">Ashley Madison, Telegram, and BitFinex</a>, but most significantly <a href="https://www.schneier.com/blog/archives/2017/11/me_on_the_equif.html">Equifax</a> and <a href="https://www.theverge.com/2017/10/3/16414306/yahoo-security-data-breach-3-billion-verizon">Yahoo!</a>.</p><p>Together, these breaches exposed the records of well over 4 billion private individuals. As you can imagine, in their wake security has been getting a significant level of increased attention.</p><p>And so it should. The internet, and the services which run atop it have become so essential to the functioning of modern life. When things go wrong there, they can have disastrous consequences for so many people.</p><p>So as software developers we appreciate — more than ever before — that if we create an application which is accessible via the internet, then it is a potential target.</p><p>That said, application security isn’t always easy to implement — especially when working for pointy-eared-bosses who place tight time and budget constraints upon us.</p><p>But just like testing, security’s something that we have to accept responsibility for, because we’re the ones who write the code.</p><p>Luckily for us though, as with using testing <a href="https://hackernoon.com/tagged/tools">tools</a> to help us thoroughly test our code, there are tools available to help us find potential security vulnerabilities. They’re called <em>static code analysis tools</em>.</p><h4>What is Static Code Analysis?</h4><p>If you’ve not heard the term before, <a href="https://www.owasp.org/index.php/Static_Code_Analysis">according to OWASP</a>, static code analysis:</p><blockquote>Commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within ‘static’ (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis.</blockquote><p>These tools, as the description indicates, don’t just find security vulnerabilities. They can also scan for a wide range of other problems, including <em>coding standard violations</em>, <em>unused code</em>, <em>performance problems</em>, and <em>error-prone code</em>.</p><p>Regardless of the software language(s) that you use, there are a number of static analysis packages available for it. And in addition to these packages there are a range of online services, often able to scan multiple languages and frameworks.</p><p>Here’s a short list for PHP (as it’s the language with which I’m most intimately familiar):</p><ul><li><a href="https://www.owasp.org/index.php/OWASP_WAP-Web_Application_Protection">OWASP WAP: Web Application Protection</a></li><li><a href="https://github.com/exakat/php-static-analysis-tools">Side Channel Analyzer:</a> Static Analysis for Detecting Side-Channel Vulnerabilities in PHP applications</li><li><a href="https://github.com/psecio/parse">psecio/parse:</a> A static scanning tool to review your PHP code for potential security-related issues</li><li><a href="https://github.com/nbs-system/php-malware-finder">PHP-malware-finder:</a> Attempts to detect obfuscated/dodgy code as well as files using PHP functions often used in malwares/webshells</li><li><a href="https://github.com/designsecurity/progpilot">progpilot:</a> A static analyzer for security purposes</li><li><a href="https://www.codacy.com/">Codacy</a></li></ul><p>With all these libraries and services, you’d be forgiven for thinking that static code analysis would be a panacea for your security problems? For example;</p><ol><li>Write your code</li><li>Run an analyzer</li><li>Correct what it finds</li><li>You’re done!</li></ol><p>And in some ways this process is just such a panacea. But it is not without limitations as well; limitations you need to be aware of.</p><p>These include:</p><ul><li><strong>Identifying false positives and negatives during software scans.</strong> It can be hard to analyze code in the context of a larger codebase. For example, how do you validate all calls to a function and what parameters are passed to those calls? How do you programmatically validate a function which is part of a larger call-chain?</li><li><strong>Difficulty detecting hard to find vulnerabilities, such as access control errors and misconfigurations. </strong>It’s common for aspects of an application to be configuration-based. A prime example is configuring access control lists. If the application being scanned is built this way, and a static code analyzer is only checking code, it may report the application as containing no known vulnerabilities, but miss an ACL misconfiguration. What’s more, how can a static analyzer fully understand ACL lists?</li></ul><p>These are just two drawbacks to bear in mind when working with static code analysis; there are others. That said, static code analysis is an excellent way to automate the process of identifying an extensive range of security issues, well before your clients and users encounter them.</p><p>While not perfect (but what is) it goes a long way to finding issues with your code, that would not normally be detected consistently and predictably.</p><h4>Static Code Analysis Has Other Benefits</h4><p>Getting back to the positives, in addition to finding security problems, static analysis tools can also be used to educate developers about security issues and about how to write more secure code.</p><p>Well designed ones will not only find valid problems, they will also explain why the problem was identified.</p><p>Secondly, they can help the team grow a sense of trust in the security-readiness of the software that they’re producing. They’re not a panacea, but they can still help to know that quality is improving.</p><p>Thirdly, they’re automatable, as they can be integrated with your team’s development tools. These include IDEs such as <em>PhpStorm</em>, and development pipelines such as <a href="https://www.phing.info/">Phing</a>, <a href="https://ant.apache.org/">Ant</a>, <a href="https://www.gnu.org/software/make/">Make</a>, <a href="http://codeship.com/">Codeship</a>, and <a href="http://capistranorb.com/">Capistrano</a>.</p><p>For example, you could integrate WAP as <a href="https://www.jetbrains.com/help/phpstorm/working-with-run-debug-configurations.html">a run configuration</a> in PhpStorm, and run it intermittently. You could also integrate it as part of <a href="https://git-scm.com/book/gr/v2/Customizing-Git-Git-Hooks">a Git commit hook</a>.</p><p>Integrating them with existing tools and workflows will help ensure that they’re used consistently. As we all know, if something’s too hard to setup or to use, it’s likely going to be avoided — even if it’s the best tool in the world!</p><h4>One Thing To Remember!</h4><p>By now, you may be thinking that the essential thing to scan is your application’s code. And you’d not be wrong. But do we write code in isolation? Do we ever write code that doesn’t have external dependencies?</p><p>I’d suggest that unless it’s a <em>very</em> small script, then it will always have at least one dependency, if not several. Looking specifically to the language which I spend most of my time with, PHP, I’d say that, more often than not, they’re going to have at least one very obvious dependency — application frameworks.</p><p>If you take a look at some of PHP’s top frameworks (<a href="https://www.cvedetails.com/product/38139/Laravel-Laravel.html?vendor_id=16542">Laravel</a>, <a href="https://www.cvedetails.com/vulnerability-list/vendor_id-5025/product_id-24644/Zend-Zend-Framework.html">Zend Framework</a>, and <a href="https://www.cvedetails.com/product/22402/Sensiolabs-Symfony.html?vendor_id=11981">Symfony</a>), you can see that each of them has at least a handful of vulnerabilities, which can lead to exploits. If you’re using Ruby, what about <a href="https://www.cvedetails.com/vulnerability-list/vendor_id-12043/product_id-22568/Rubyonrails-Ruby-On-Rails.html">Ruby on Rails</a>? If you’re using Python, what about <a href="https://www.cvedetails.com/product/18211/Djangoproject-Django.html?vendor_id=10199">Django</a>?</p><p>This isn’t meant as a hack job on any one of these frameworks. I mention them just to point out that you have to be holistic in your security thinking. Make sure that you check your external dependencies and frameworks to see if they have vulnerabilities which need patching.</p><h4>A Step-through Example</h4><p>Now that we’ve had a good introduction to static code analysis and started considering what to scan, let’s work through how to use static code analysis to find and resolve security issues in our code.</p><p>In this example we’ll use Codacy to scan <a href="https://github.com/laravel/framework">the Laravel framework codebase</a>, PHP’s most popular application development framework.</p><p>We’re not going to go too deep into Codacy. We’ll just stick to the essentials of what we need to know so that you get a broad overview of how the service works and how scans work. If you’d like to explore further however, feel free to do so.</p><h4>First: Import the project into Codacy</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NlvF9ZsyuRIFA0Vvb7SffA.png" /></figure><p>To get your project into Codacy, the first thing that you need to do is to import it. This is quite trivial if your Codacy account is linked to either a GitHub or Bitbucket account.</p><p>If so, as you can see in the image above, scroll through the list of projects, and check one or more of them that you want to import.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*SDGdlRX6QfV7tNVovjPjpQ.png" /></figure><p>After that, the project’s code will be <em>reviewed</em>, <em>cloned</em>, and <em>analyzed</em>. Depending on the size of the project, this may take a bit of time.</p><p>For what it’s worth, I imported a large project yesterday, which took about 15 minutes to prepare. However, I’ve never found the import process to take more than about 3–5 minutes normally.</p><h4>Second: View The Security Vulnerabilities</h4><p>Once the project’s completed, you’ll be redirected to the project’s dashboard, which you can see above. As Codacy performs a wide-range of static code analysis, not just for security problems, you’ll see project analysis for a number of those areas.</p><p>However, you can see a birds-eye-view security score on the lower left-hand side of the dashboard, just above “<strong>Open Pull Requests</strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*5TOmui96LNws_NUf4HNuMg.png" /></figure><p>To view, the security vulnerabilities click “<strong>Security</strong>” in the left-hand navigation menu. There, you’ll see the 15 categories which Codacy uses to classify security problems; including <em>Auth</em>, <em>CSRF</em>, <em>DoS</em>, <em>SQL Injection</em>, and <em>XSS</em>.</p><p>Only categories marked with a red cross contain security problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*IJLTjc0XRZEdRwCMzgJ-Uw.png" /></figure><p>One thing to bear in mind; not all of the security patterns are enabled by default. This can be a good thing, depending on your project’s age. In the example I’m using, <a href="https://github.com/laravel/laravel">which is Laravel</a>, this is not an issue.</p><p>You can see that it performs quite well, as you’d expect. However, it does show problems in <em>File Access</em>, <em>Input validation</em>, <em>Other</em>, and <em>Regex</em>. Looking in “<strong>Other</strong>”, you can see that one issue has been flagged in one file. The other categories only refer to the same file.</p><p><em>On a side note; as a PHP enthusiast, I’m proud that no PHP-issues were found.</em></p><h4>Three: View An Issue</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*_GXHH7vG0iEuGFxZa0NoaA.png" /></figure><p>Looking at the issue, you can see that it’s highlighted “<strong>Generic Object Injection Sink</strong>” as the problem in public/js/app.js. Expanding it out further, you can see quite a detailed description of why the issue has been flagged and what it may mean.</p><p>It’s worth noting here, <em>again</em>, that highlighted issues may be false positives or false negatives. So you have to be discerning when reviewing issues and determine if they are actually an issue or not.</p><h4>Four: Fix an Issue</h4><p>When you’ve found a genuine issue, something which needs fixing, you can begin doing so from the dashboard. Codacy helps you in two ways. Firstly, the dashboard gives you an estimate of the time it would take to fix. In this bug’s case, it’s anticipated that it should take no longer than 15 minutes to fix.</p><p>Secondly, you can create an issue in either GitHub or Bitbucket directly from the issue. By clicking “<strong>Settings</strong>” (the cog icon next to “<strong>View File</strong>”) -&gt;“<strong>GitHub</strong>” -&gt; “<strong>Create Issue</strong>” a popup window appears, which you can see below.</p><p>The window contains a default issue title, pre-filled with the identified issue, and a message with some default information, including the message, commit hash, file name, and line number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*rgO2p6r1a5hwIE3n2nkH2w.png" /></figure><p>From there, you can then resolve the issue with a future pull request, and then rescan the codebase to ensure that the issue is no longer reported.</p><h4>Wind Up</h4><p>And that’s been a rapid introduction to static code analysis, how it can be integrated into one or more places in your development tools and workflow, as well as a working example of how to use it to identify (and stay abreast) of security vulnerabilities within your application.</p><p>If this is your first time hearing about the concept and the tools, I strongly encourage you to have a look through the supplied list of tools, along with the links in the further reading section.</p><p>That way, you’ll progressively expand your knowledge and awareness of how to develop more secure, more robust software. If you’d like to know more about Codacy, feel free to <a href="https://www.codacy.com/signup">sign up for a 14-day trial</a>, and begin analyzing your applications.</p><blockquote>Read more articles on <a href="https://goo.gl/YofvZW"><strong>The Codacy Blog</strong></a><strong>.</strong></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b45498cedfb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/how-static-code-analysis-helps-you-rapidly-fix-software-vulnerabilities-7b45498cedfb">How Static Code Analysis Helps You Rapidly Fix Software Vulnerabilities</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shortcuts to Learning Kotlin]]></title>
            <link>https://medium.com/hackernoon/shortcuts-to-learning-kotlin-b9390c44318b?source=rss-d8be98cdccce------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9390c44318b</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[weekly-sponsor]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Matthew Setter]]></dc:creator>
            <pubDate>Mon, 08 Jan 2018 18:43:06 GMT</pubDate>
            <atom:updated>2019-05-14T04:44:22.917Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QkqXaMjLkqCJG9OIwUjvGQ.png" /></figure><h3>How the $170 million Ethereum bug could have been prevented</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*zFLiB17cCsdQIrOV5MDo8g.png" /></figure><blockquote>Disclosure: <a href="https://goo.gl/s8fRSz"><strong>Codacy</strong></a>, the automated code reviews platform, has previously sponsored Hacker Noon. For Hacker Noon readers, they’re <a href="https://goo.gl/s8fRSz"><strong>offering 15% off using this code: HACKERNOON</strong></a><strong>.</strong></blockquote><p>Kotlin is a language I thought about using for some time, yet it wasn’t until recently that I decided to give it a try. And I’m so excited that I have!</p><p>If you’ve not heard of Kotlin, it’s a language that, while newer than most, has gained significant amounts of traction in recent years. And why not? It has a series of advantages, especially over <a href="https://hackernoon.com/tagged/java">Java</a>, that makes it quite compelling.</p><p>Here’s a short selection:</p><ul><li>It’s developed by an experienced software company, <a href="https://www.jetbrains.com/">JetBrains</a>.</li><li>It’s a first-class language for <a href="https://hackernoon.com/tagged/android">Android</a>.</li><li>It’s influenced by <em>Java</em>, <em>Scala</em>, <em>Groovy</em>, <em>C#</em>, <em>Gosu</em>, <em>JavaScript</em>, and <em>Swift</em>.</li><li>It’s interchangeable with Java.</li><li>High Order functions. These are functions that accept functions as parameters.</li><li>Null safety. Variables need to be nullable to able to be set to null.</li><li>Extension Functions. These allow you to extend an existing class, without inheriting from it.</li><li>Type inference for variable and property types</li><li>Data classes: These automatically have equals(), hashCode(), toString(), and copy() functions.</li></ul><p>And these are just a small selection. If you want more, definitely check out <a href="https://www.androidauthority.com/kotlin-vs-java-783187/">this list from Android Authority</a>.</p><p>However, if you’re still sitting on the fence regarding learning Kotlin, I thought I’d share a series of tips and resources with you, to get you off the fence and learning.</p><h3>Resources</h3><h4>The Official Kotlin Site</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ivXzAtuh7yee1lUHFHGKWA.png" /><figcaption>The Official Kotlin Site</figcaption></figure><p>Like most languages, there is an official site for the language, at <a href="https://kotlinlang.org/">kotlinlang.org</a>. There, you’ll find a wealth of information and helpful resources, whether you’re a beginner, intermediate, or more advanced Kotlin developer.</p><p>There’s <a href="https://kotlinlang.org/docs/reference/">Kotlin’s reference documentation</a>, which steps you through from the absolute basics, including <em>basic syntax</em>, <em>idioms</em>, and <em>coding convention</em>, through the entire feature set of the language, such as <em>classes</em>, <em>objects</em>, <em>generics</em>, <em>nested classes</em>, and <em>lambdas</em>.</p><p>There’s <a href="https://kotlinlang.org/docs/tutorials/">a range of tutorials</a> that</p><ul><li>Get you started using both IDEs and the command line</li><li>Show how to work with build tools</li><li>Show how to use Kotlin in a range of different environments, such as with <em>Android</em>, <em>Java</em>, <em>JavaScript</em>, and <em>Web Development</em>.</li></ul><p>Then there is <a href="https://kotlinlang.org/docs/books.html">a list of books</a>, including Kotlin in action and Kotlin for Android Developers, and <a href="https://kotlinlang.org/docs/resources.html">a host of other resources</a>, including frameworks, libraries, editor and IDE plugins.</p><p>After having spent much time on KotlinLang, and performing numerous searches, I’ve yet to find a site that so offers such well organized and comprehensive information on Kotlin as this site does. Other sites, such as those created by individual developers, are great, but nothing tops the depth of information that you’ll find here.</p><p>My tip is to either pick one of the getting started guides in the tutorials section or work through the Overview and Getting Started sections in the Reference section. Then, build your knowledge progressively from there.</p><h4>The Kotlin Slack Channel</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qnOKIBJwHN5YgonXHIe6Ug.png" /><figcaption>The Kotlin Slack Channel</figcaption></figure><p>The next best resource I’ve found is <a href="http://slack.kotlinlang.org/">the Kotlin Slack channel</a>. I begrudgingly accept that IRC doesn’t have the popularity or mindshare that Slack has achieved. And if I could, it’d be IRC all the way.</p><p>However, the people have spoken and the Slack channel it is. In the channel, you’ll find channels for discussions for:</p><ul><li>Working with Android.</li><li>Getting started.</li><li>Server and JavaScript development.</li></ul><p>Like all good communities, you’ll find helpful advice to questions that people have, links to exciting tidbits, recent happenings, libraries and packages, and a heap more.</p><p>The experience I’ve had there has been excellent. Even though I’m relatively new, the community’s been welcoming, knowledgeable, and responsive. I can’t say that for every community I’ve been a part of, or which I’ve attempted to interact.</p><h4>A Twitter Search for Kotlin</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LfGRrXj8cTQ0vdw5hUcQyg.png" /><figcaption>A Twitter Search for Kotlin</figcaption></figure><p>While Twitter doesn’t have quite the reach and popularity that it once did, it can still rapidly yield significant results for technical topics. Just searching on “<em>Kotlin</em>” returns links to a plethora of information, which includes:</p><ul><li><a href="https://www.kotlinconf.com/">Kotlinconf17</a></li><li>Code style discussions</li><li>Tooling support, such as <em>Spring</em>, <em>Gradle</em>, and <em>IntelliJ IDEA</em></li><li>Platform-specific discussions, such as for Android and iOS</li><li>Discussions about language features, such as coroutines</li><li>Accounts of leading Kotlin developers and influencers, such as <a href="https://twitter.com/abreslav?lang=en">Andrey Breslav</a>, Kotlin’s lead language designer.</li></ul><h3>Tips</h3><p>Now that we’ve worked through a series of top resources let’s look at a set of tips to help you get your Kotlin on.</p><h4>Grab a (Free) Copy of IntelliJ IDEA Community</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5_fSHbiLNfyycZuzMq36KQ.png" /><figcaption>IntelliJ IDEA Community</figcaption></figure><p>While there are a range of IDEs that support Kotlin, such as Eclipse, none has as through support as IntelliJ IDEA, by Kotlin’s core development company, JetBrains.</p><p>I might seem biased, as I love using PhpStorm when writing PHP code, and in a way I am. However, even a small amount of googling will return results for IntelliJ than for any other editor or IDE.</p><p>There are two versions, Ultimate (commercial and not free) and Community (open-source, released under the Apache 2.0 license). Naturally, there are some differences between the two.</p><p>For just getting started, the community version has all the functionality that you will need, such as <em>code analysis</em>, <em>insights</em>, <em>inspections</em>, <em>integrated version control</em>, <em>code completion</em>, and an absolute plethora of plugins.</p><p>However, those differences aside, it provides rich functionality, including:</p><ul><li>Integrated tooling for rapidly bootstrapping new Kotlin projects using both Maven and Gradle, of which the latter I’m finding the preferable of the two.</li><li>Handles template project directory creation</li><li>Has integrated Gradle support, so that you can perform any task directly from the UI. You can drop to a terminal if you prefer that approach, as the projects provide gradlew and gradlew.bat, command-line utilities for running any Gradle task.</li></ul><h4>Do the Koans</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nb5WiEj8kpGp0mfua3gULQ.png" /><figcaption>Kotlin Koans</figcaption></figure><p>Let’s say that you’ve installed a copy of IntelliJ IDEA Community and created a basic project. Now what? Good question. Like any skill, to get better at it, you have to use it regularly, progressively learning every aspect of it.</p><p>You have to learn in an organized and focused manner. To help you do that, Kotlin offers Koans. <a href="https://www.elephantjournal.com/2012/11/what-are-koans-why-are-they-important/">Koans are</a>:</p><blockquote>A phrase, dialogue, or saying that a practitioner uses to break down the shell of his or her identity. The koan serves as a surgical tool used to cut into and then break through the mind of the practitioner.</blockquote><p>They’re a way of breaking down and learning a skill, and they come in three forms:</p><p>1. <a href="https://try.kotlinlang.org/#/Kotlin%20Koans/Introduction/Hello,%20world!/Task.kt">Kotlin Online Koans</a><br>2. As <a href="http://kotlinlang.org/docs/tutorials/edu-tools-learner.html">plugins for IntelliJ and Android Studio</a><br>3. As <a href="https://github.com/Kotlin/kotlin-koans">a GitHub repository</a></p><p>The online version, which you can see above, offers a list of 42, covering the core language features, starting with the most basic, simple functions. Using them, you can learn in an organized fashion, progressively improving your skills.</p><p>That way, you have a clear path from beginner to advanced, you can see how much you’ve learned and how far you’ve come, and you don’t have to search for what to learn next endlessly.</p><h4>Port an Existing Application</h4><p>Assuming that you’ve worked through several — or all — of the Koans, and you’re feeling comfortable with your Kotlin knowledge (as well as of its idioms), it’s time to build a meaningful application; something other than the typical Hello World example.</p><p>The trouble is, everyone’s needs are different. So what kind of application should you create?<br>I offer advice from a programming mentor of mine, John Sonmez, <a href="https://simpleprogrammer.com/2017/06/15/learn-new-programming-language-fast/">when he quoted Douglas Hofstadter</a>:</p><blockquote>The only way that we can learn new information is that it’s an analogy to something else.</blockquote><p>He suggests that when you port an existing application (preferably one that you’ve created), you learn so much quicker as:</p><ul><li>You don’t need to think about what to develop.</li><li>You can learn the new language more rapidly, as you’re learning it through analogies to an existing one.</li><li>You can relate the language to what you already know and build on that existing foundation</li></ul><p>Ideally, I’d suggest that the application which you port is smaller rather than bigger. That way you can gain a sense of success and satisfaction quicker.</p><p>However, the application needs to be more than “<em>hello world</em>”, so that you can cover a sufficiently broad cross-section of the new language, and not just grab the low-hanging fruit.</p><h4>Learn from Existing Projects and Other Developers</h4><p>The last way that I suggest that you learn Kotlin, is something not specific to Kotlin, but applicable to any software language, it’s by reading through code of existing projects and by learning from other developers. I can’t recommend this approach highly enough!</p><p>If there’s one way that propelled my knowledge of a language, it was by working with developers (often far) more experienced than I was.</p><p>By seeing how they approached and solved problems, the way that they wrote code, the evolution of their code over time, and asking them questions, I learned far more rapidly than learning on my own.</p><p>I’m not going to go into significant depth here, suffice to say that these two approaches are veritable treasure troves of knowledge that you never want to pass up.</p><h4>Links</h4><p>Time for one last tip, a set of links to various blog posts that have helped me no end as I’ve been learning.</p><ul><li><a href="https://medium.com/@octskyward/why-kotlin-is-my-next-programming-language-c25c001e26e3"><strong>Why Kotlin is my next programming language</strong></a>. This post provides a thorough and detailed analysis of why developer Mike Hearn made the move from Java to Kotlin. Despite being written back in mid-2015, the reasoning is still very valid. He discusses why Kotlin’s a good language, as it compiles to JVM bytecode and JavaScript, interchangeable with Java, can use existing Java frameworks and libraries, and has strong commercial support; if you’re keen to get a deep-dive introduction, read this first!</li><li><a href="https://medium.com/@magnus.chatt/why-you-should-totally-switch-to-kotlin-c7bbde9e10d5"><strong>Why You Should Totally Switch to Kotlin</strong></a>. Written by Magnus Vinther, provides seventeen convincing reasons for switching to Kotlin; including <em>IDE support</em>, <em>better Lambdas</em>, <em>Ranges</em>, <em>Destructuring Declarations</em>, <em>operating overloading</em>, and <em>the When Expression</em>. Afterward, he provides a series of links to other blog posts, some of which I’ve included here, that build on what he started.</li><li><a href="https://hashnode.com/post/why-i-abandoned-java-in-favour-of-kotlin-ciuzhmecf09khdc530m1ghu6d"><strong>Why I Abandoned Java in Favour of Kotlin</strong></a>. Written by Jan Vladimir Mostert, this post was an amusing read as Jan openly states that he fell in love with Java, yet felt that he had to move on and that Kotlin was where he had to go. Given that strong affiliation with Java, he presents a compelling set of reasons for doing so.</li><li><a href="https://frozenfractal.com/blog/2017/2/10/10-cool-things-about-kotlin/"><strong>10 Cool Things About Kotlin</strong></a>. As the name implies, this is a list post about ten excellent features of Kotlin. A lot of the points are covered in the other links provided. However, what’s nice about this post, is that it allows you to dip your toe in the water, without getting overwhelmed in too much detail. So if you’re short on time, or want to know what the fuss is about quickly, start here.</li><li><a href="http://nilhcem.com/swift-is-like-kotlin/"><strong>Swift is Like Kotlin</strong></a> and <a href="https://fabiomsr.github.io/from-java-to-kotlin/"><strong>From Java to Kotlin</strong></a>. These two sites provide a concise and well laid-out comparison of a range of Kotlin’s language features, and how they would be written in either Swift or Java.</li></ul><h3>In Closing</h3><p>Those are my shortcuts for learning Kotlin. I’m not as experienced as other Kotlin developers, but I see that as an advantage, not a hindrance.</p><p>I hope that my relatively fresh eyes and enthusiasm have given you a substantial insight into why Kotlin must be on your list of languages to learn.</p><p>If you know of other reasons or want to share your experience coming from another language, I’d love to hear it in the comments and to have a discussion with you. So don’t be shy, share your knowledge!</p><p>Oh, one last thing, if you’re keen to review the quality of your Kotlin code, Codacy has your back, as <a href="https://www.codacy.com/">they have Kotlin in their list of supported languages</a>. Sign up, login, add your project, and get a handle on its quality.</p><blockquote>Read more articles on <a href="https://goo.gl/YofvZW"><strong>The Codacy Blog</strong></a><strong>.</strong></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9390c44318b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/shortcuts-to-learning-kotlin-b9390c44318b">Shortcuts to Learning Kotlin</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Static Code Analysis Helps You Rapidly Fix Software Vulnerabilities]]></title>
            <link>https://medium.com/codacy/https-medium-com-settermjd-how-static-code-analysis-helps-you-rapidly-fix-software-vulnerabilities-fe51481cfd4?source=rss-d8be98cdccce------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe51481cfd4</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[static-code-analysis]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Matthew Setter]]></dc:creator>
            <pubDate>Thu, 04 Jan 2018 11:38:13 GMT</pubDate>
            <atom:updated>2018-07-17T14:21:47.873Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ewkExZHvesRhqGn-3ipiA.png" /></figure><p>There have been a spate of high profile security breaches in recent years. These include <a href="https://blog.sqreen.io/security-year-in-review/">Ashley Madison, Telegram, and BitFinex</a>, but most significantly <a href="https://www.schneier.com/blog/archives/2017/11/me_on_the_equif.html">Equifax</a> and <a href="https://www.theverge.com/2017/10/3/16414306/yahoo-security-data-breach-3-billion-verizon">Yahoo!</a>.</p><p>Together, these breaches exposed the records of well over 4 billion private individuals. As you can imagine, in their wake security has been getting a significant level of increased attention.</p><p>And so it should. The internet, and the services which run atop it have become so essential to the functioning of modern life. When things go wrong there, they can have disastrous consequences for so many people.</p><p>So as software developers we appreciate — more than ever before—that if we create an application which is accessible via the internet, then it is a potential target.</p><p>That said, application security isn’t always easy to implement — especially when working for pointy-eared-bosses who place tight time and budget constraints upon us.</p><p>But just like testing, security’s something that we have to accept responsibility for, because we’re the ones who write the code.</p><p>Luckily for us though, as with using testing tools to help us thoroughly test our code, there are tools available to help us find potential security vulnerabilities. They’re called <a href="https://www.codacy.com/blog/why-you-need-to-perform-source-code-analysis/"><em>static code analysis tools</em></a>.</p><h4>What is Static Code Analysis?</h4><p>If you’ve not heard the term before, <a href="https://www.owasp.org/index.php/Static_Code_Analysis">according to OWASP</a>, static code analysis:</p><blockquote>Commonly refers to the running of Static Code Analysis tools that attempt to highlight possible vulnerabilities within ‘static’ (non-running) source code by using techniques such as Taint Analysis and Data Flow Analysis.</blockquote><p>These tools, as the description indicates, don’t just find security vulnerabilities. They can also scan for a wide range of other problems, including <em>coding standard violations</em>, <em>unused code</em>, <em>performance problems</em>, and <em>error-prone code</em>.</p><p>Regardless of the software language(s) that you use, there are a number of static analysis packages available for it. And in addition to these packages there are a range of online services, often able to scan multiple languages and frameworks.</p><p>Here’s a short list for PHP (as it’s the language with which I’m most intimately familiar):</p><ul><li><a href="https://www.owasp.org/index.php/OWASP_WAP-Web_Application_Protection">OWASP WAP: Web Application Protection</a></li><li><a href="https://github.com/exakat/php-static-analysis-tools">Side Channel Analyzer:</a> Static Analysis for Detecting Side-Channel Vulnerabilities in PHP applications</li><li><a href="https://github.com/psecio/parse">psecio/parse:</a> A static scanning tool to review your PHP code for potential security-related issues</li><li><a href="https://github.com/nbs-system/php-malware-finder">PHP-malware-finder:</a> Attempts to detect obfuscated/dodgy code as well as files using PHP functions often used in malwares/webshells</li><li><a href="https://github.com/designsecurity/progpilot">progpilot:</a> A static analyzer for security purposes</li><li><a href="https://www.codacy.com/">Codacy</a></li></ul><p>With all these libraries and services, you’d be forgiven for thinking that static code analysis would be a panacea for your security problems? For example;</p><ol><li>Write your code</li><li>Run an analyzer</li><li>Correct what it finds</li><li>You’re done!</li></ol><p>And in some ways this process is just such a panacea. But it is not without limitations as well; limitations you need to be aware of.</p><p>These include:</p><ul><li><strong>Identifying false positives and negatives during software scans.</strong> It can be hard to analyze code in the context of a larger codebase. For example, how do you validate all calls to a function and what parameters are passed to those calls? How do you programmatically validate a function which is part of a larger call-chain?</li><li><strong>Difficulty detecting hard to find vulnerabilities, such as access control errors and misconfigurations. </strong>It’s common for aspects of an application to be configuration-based. A prime example is configuring access control lists. If the application being scanned is built this way, and a static code analyzer is only checking code, it may report the application as containing no known vulnerabilities, but miss an ACL misconfiguration. What’s more, how can a static analyzer fully understand ACL lists?</li></ul><p>These are just two drawbacks to bear in mind when working with static code analysis; there are others. That said, static code analysis is an excellent way to automate the process of identifying an extensive range of security issues, well before your clients and users encounter them.</p><p>While not perfect (but what is) it goes a long way to finding issues with your code, that would not normally be detected consistently and predictably.</p><h4>Static Code Analysis Has Other Benefits</h4><p>Getting back to the positives, in addition to finding security problems, static analysis tools can also be used to educate developers about security issues and about how to write more secure code.</p><p>Well designed ones will not only find valid problems, they will also explain why the problem was identified.</p><p>Secondly, they can help the team grow a sense of trust in the security-readiness of the software that they’re producing. They’re not a panacea, but they can still help to know that quality is improving.</p><p>Thirdly, they’re automatable, as they can be integrated with your team’s development tools. These include IDEs such as <em>PhpStorm</em>, and development pipelines such as <a href="https://www.phing.info/">Phing</a>, <a href="https://ant.apache.org/">Ant</a>, <a href="https://www.gnu.org/software/make/">Make</a>, <a href="http://codeship.com/">Codeship</a>, and <a href="http://capistranorb.com/">Capistrano</a>.</p><p>For example, you could integrate WAP as <a href="https://www.jetbrains.com/help/phpstorm/working-with-run-debug-configurations.html">a run configuration</a> in PhpStorm, and run it intermittently. You could also integrate it as part of <a href="https://git-scm.com/book/gr/v2/Customizing-Git-Git-Hooks">a Git commit hook</a>.</p><p>Integrating them with existing tools and workflows will help ensure that they’re used consistently. As we all know, if something’s too hard to setup or to use, it’s likely going to be avoided—even if it’s the best tool in the world!</p><h4>One Thing To Remember<em>!</em></h4><p>By now, you may be thinking that the essential thing to scan is your application’s code. And you’d not be wrong. But do we write code in isolation? Do we ever write code that doesn’t have external dependencies?</p><p>I’d suggest that unless it’s a <em>very</em> small script, then it will always have at least one dependency, if not several. Looking specifically to the language which I spend most of my time with, PHP, I’d say that, more often than not, they’re going to have at least one very obvious dependency — application frameworks.</p><p>If you take a look at some of PHP’s top frameworks (<a href="https://www.cvedetails.com/product/38139/Laravel-Laravel.html?vendor_id=16542">Laravel</a>, <a href="https://www.cvedetails.com/vulnerability-list/vendor_id-5025/product_id-24644/Zend-Zend-Framework.html">Zend Framework</a>, and <a href="https://www.cvedetails.com/product/22402/Sensiolabs-Symfony.html?vendor_id=11981">Symfony</a>), you can see that each of them has at least a handful of vulnerabilities, which can lead to exploits. If you’re using Ruby, what about <a href="https://www.cvedetails.com/vulnerability-list/vendor_id-12043/product_id-22568/Rubyonrails-Ruby-On-Rails.html">Ruby on Rails</a>? If you’re using Python, what about <a href="https://www.cvedetails.com/product/18211/Djangoproject-Django.html?vendor_id=10199">Django</a>?</p><p>This isn’t meant as a hack job on any one of these frameworks. I mention them just to point out that you have to be holistic in your security thinking. Make sure that you check your external dependencies and frameworks to see if they have vulnerabilities which need patching.</p><h4>A Step-through Example</h4><p>Now that we’ve had a good introduction to static code analysis and started considering what to scan, let’s work through how to use static code analysis to find and resolve security issues in our code.</p><p>In this example we’ll use Codacy to scan <a href="https://github.com/laravel/framework">the Laravel framework codebase</a>, PHP’s most popular application development framework.</p><p>We’re not going to go too deep into Codacy. We’ll just stick to the essentials of what we need to know so that you get a broad overview of how the service works and how scans work. If you’d like to explore further however, feel free to do so.</p><h4>First: Import the project into Codacy</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NlvF9ZsyuRIFA0Vvb7SffA.png" /></figure><p>To get your project into Codacy, the first thing that you need to do is to import it. This is quite trivial if your Codacy account is linked to either a <a href="https://www.codacy.com/github-code-review/">GitHub</a> or <a href="https://www.codacy.com/bitbucket-code-review/">Bitbucket</a> account.</p><p>If so, as you can see in the image above, scroll through the list of projects, and check one or more of them that you want to import.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*SDGdlRX6QfV7tNVovjPjpQ.png" /></figure><p>After that, the project’s code will be <em>reviewed</em>, <em>cloned</em>, and <em>analyzed</em>. Depending on the size of the project, this may take a bit of time.</p><p>For what it’s worth, I imported a large project yesterday, which took about 15 minutes to prepare. However, I’ve never found the import process to take more than about 3–5 minutes normally.</p><h4>Second: View The Security Vulnerabilities</h4><p>Once the project’s completed, you’ll be redirected to the project’s dashboard, which you can see above. As Codacy performs a wide-range of static code analysis, not just for security problems, you’ll see project analysis for a number of those areas.</p><p>However, you can see a birds-eye-view security score on the lower left-hand side of the dashboard, just above “<strong>Open Pull Requests</strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*5TOmui96LNws_NUf4HNuMg.png" /></figure><p>To view, the security vulnerabilities click “<strong>Security</strong>” in the left-hand navigation menu. There, you’ll see the 15 categories which Codacy uses to classify security problems; including <em>Auth</em>, <em>CSRF</em>, <em>DoS</em>, <em>SQL Injection</em>, and <em>XSS</em>.</p><p>Only categories marked with a red cross contain security problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*IJLTjc0XRZEdRwCMzgJ-Uw.png" /></figure><p>One thing to bear in mind; not all of the security patterns are enabled by default. This can be a good thing, depending on your project’s age. In the example I’m using, <a href="https://github.com/laravel/laravel">which is Laravel</a>, this is not an issue.</p><p>You can see that it performs quite well, as you’d expect. However, it does show problems in <em>File Access</em>, <em>Input validation</em>, <em>Other</em>, and <em>Regex</em>. Looking in “<strong>Other</strong>”, you can see that one issue has been flagged in one file. The other categories only refer to the same file.</p><p><em>On a side note; as a PHP enthusiast, I’m proud that no PHP-issues were found.</em></p><h4>Three: View An Issue</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*_GXHH7vG0iEuGFxZa0NoaA.png" /></figure><p>Looking at the issue, you can see that it’s highlighted “<strong>Generic Object Injection Sink</strong>” as the problem in public/js/app.js. Expanding it out further, you can see quite a detailed description of why the issue has been flagged and what it may mean.</p><p>It’s worth noting here, <em>again</em>, that highlighted issues may be false positives or false negatives. So you have to be discerning when reviewing issues and determine if they are actually an issue or not.</p><h4>Four: Fix an Issue</h4><p>When you’ve found a genuine issue, something which needs fixing, you can begin doing so from the dashboard. Codacy helps you in two ways. Firstly, the dashboard gives you an estimate of the time it would take to fix. In this bug’s case, it’s anticipated that it should take no longer than 15 minutes to fix.</p><p>Secondly, you can create an issue in either GitHub or Bitbucket directly from the issue. By clicking “<strong>Settings</strong>” (the cog icon next to “<strong>View File</strong>”) -&gt; “<strong>GitHub</strong>” -&gt; “<strong>Create Issue</strong>” a popup window appears, which you can see below.</p><p>The window contains a default issue title, pre-filled with the identified issue, and a message with some default information, including the message, commit hash, file name, and line number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*rgO2p6r1a5hwIE3n2nkH2w.png" /></figure><p>From there, you can then resolve the issue with a future pull request, and then rescan the codebase to ensure that the issue is no longer reported.</p><h4>Wind Up</h4><p>And that’s been a rapid introduction to static code analysis, how it can be integrated into one or more places in your development tools and workflow, as well as a working example of how to use it to identify (and stay abreast) of security vulnerabilities within your application.</p><p>If this is your first time hearing about the concept and the tools, I strongly encourage you to have a look through the supplied list of tools, along with the links in the further reading section.</p><p>That way, you’ll progressively expand your knowledge and awareness of how to develop more secure, more robust software. If you’d like to know more about Codacy, feel free to <a href="https://www.codacy.com/signup">sign up for a 30-day trial</a>, and begin analyzing your applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe51481cfd4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codacy/https-medium-com-settermjd-how-static-code-analysis-helps-you-rapidly-fix-software-vulnerabilities-fe51481cfd4">How Static Code Analysis Helps You Rapidly Fix Software Vulnerabilities</a> was originally published in <a href="https://medium.com/codacy">Codacy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Five Ways to Slim Your Docker Images]]></title>
            <link>https://medium.com/codacy/five-ways-to-slim-your-docker-images-5f4bd68d29f1?source=rss-d8be98cdccce------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f4bd68d29f1</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[alpine-linux]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Matthew Setter]]></dc:creator>
            <pubDate>Thu, 14 Dec 2017 14:03:47 GMT</pubDate>
            <atom:updated>2018-07-17T14:21:24.703Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*ZBTolWXaa7xtoed7VZGT8w.png" /></figure><p><a href="https://www.codacy.com/blog/docker-basics/">Docker</a> is a pretty awesome tool, I hope you’ll agree. With it, we can create environments for development, staging, production, and testing — or anything else — with next to no effort.</p><p>What’s more, using Docker makes building environments far quicker than it ever was before. Given that, plus a range of other benefits, it’s no wonder Docker’s gained such significant traction and popularity in recent years.</p><p>However Docker, like any technology, isn’t perfect. Moreover, one glaring way in which it isn’t is the size that Docker images can quickly grow to become. This point was driven home to me a month or so ago when I stopped to wonder where a significant chunk of my Mac’s drive space had gone.</p><h3>Matthew Setter on Twitter</h3><p>Do you have unused #Docker images lying around? Use „docker system prune&quot; to clean them up. I just reclaimed 41GB.</p><h3>Matthew Setter on Twitter</h3><p>@jasper_jorna I ended up reclaiming 100GB.</p><p>After a quick bit of searching, I found that over 100 GB — <strong>that’s right 100 GB!</strong> — was being used by Docker images. To be fair, <a href="https://www.masterzendframework.com/docker-from-development-to-deployment/">I have been doing quite a lot of experimenting with Docker</a> while I’ve been learning about it. So it should come as no surprise that I’ve built a lot of images which consume quite a bit of space. However, that they took up this much blew my mind!</p><h3>That’s Why You Should Slim Down Docker Images?</h3><p>On a local development machine, it might be okay to consume significant hard drive space. After all, if it takes a while you can always grab another coffee or tea, take a break from the screen to rest your eyes, grab some lunch, or discuss something with a colleague.</p><p>However, what about when deploying to <em>testing</em>, <em>staging</em>, and <em>production</em>? Or what if you’re pulling down large images to form the base of your Docker images or clusters in your CI/CD pipeline?</p><p>While bandwidth and disk space is cheap, time isn’t. If you’re not careful, you’ll be wasting precious (read: <strong>expensive</strong>) time waiting for images to download as you build and re-build your images and push your deployments.</p><p>So today I’m going to step you through five ways in which you can slim down your Docker images, so that you’re spending as little time waiting, and on bandwidth and disc space, as possible.</p><h3>How Do You Slim Down Docker Images?</h3><p>That’s a good question. Gladly, the answer isn’t too complicated. I watched <a href="https://blog.codeship.com/alpine-based-docker-images-make-difference-real-world-apps/">a talk from Codeship</a> a little while ago, which advocates several steps, which form the basis of the following five steps. Let’s step through them.</p><h4>One: Think Carefully About Your Application’s Needs</h4><p>Do you genuinely think about the application that you’re deploying? Do you fully consider the <em>language</em>, <em>framework</em>,<em> extensions</em>, <em>tools</em>, and <em>third-party packages</em> which it needs? Or do you install everything, such as development tools and Linux headers, before installing your application?</p><p>Bear in mind that everything that you install increases an image’s size, as you’d expect. While it may be easier to work this way (some may argue that it is quick and efficient) is it useful — over the long term?</p><p>Alternatively, if you stop and consider your application’s needs in-depth, you may be surprised as to just how little it may need. Sure, you don’t get the thrill of jumping in straight-away and building something. Moreover, you might even see planning as somewhat dull and tedious.</p><p>However, remember the old saying: “<strong>Proper Planning Prevents Poor Performance</strong>”. It’s an adage well worth remembering!</p><h4>Two: Use a Small Base Image</h4><p>What base image are you using? For quite some time, the default Docker image used <a href="https://hub.docker.com/_/ubuntu/">Ubuntu</a>, which made sense for several reasons. Let’s consider two of the biggest.</p><p><strong>Firstly</strong>, Ubuntu’s based on Debian, which uses <a href="https://wiki.debian.org/Apt">the Apt package manager</a>. Apt is one of the most well thought out and most feature-rich package managers available. What’s more, its interface is about as intuitive as you can get.</p><p><strong>Secondly</strong>, Ubuntu is <a href="https://www.linux.com/news/learn/sysadmin/best-linux-distributions-2017">one of the most popular Linux distributions</a>, so its conventions are well understood by a large percentage of developers and systems administrators.</p><p>That said, when using Ubuntu as a foundation, your base image won’t be particularly small. Weighing in at around 188 MB, Ubuntu comes packed with most of the tools that you’re likely to need, even if you don’t need them. It’s an excellent example of size being sacrificed for ease of use.</p><p>There’s nothing, <em>necessarily</em>, wrong with that, but if you want as small an image as possible, you’re going to have to use a different base image. Luckily, one is readily available and is the new default for Docker images; it’s called <a href="https://alpinelinux.org/">Alpine Linux</a>.</p><p>Alpine Linux is:</p><blockquote>a small Linux distribution based on musl and BusyBox, primarily designed for “power users who appreciate security, simplicity and resource efficiency.</blockquote><p>As a result, an image based on Alpine Linux is typically around 5 MB in size. That’s a size saving of <strong>around 97%!</strong></p><p>Compare that to Ubuntu’s size and you can see how making this one change alone is a significant saving. To make it easier, here’s an image size comparison, from Brian Christner:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*31Q1iVET0Z_7LmIdjNgSLA.png" /><figcaption>Docker image size comparison, <a href="https://www.brianchristner.io/docker-image-base-os-size-comparison/">image by Brian Christner</a>.</figcaption></figure><p><strong>See what I mean?</strong></p><p>However, changing the default base image isn’t without some cost. The first is that Alpine Linux doesn’t provide much functionality out of the box. As a result, you’re going to have to better understand what your image needs and the dependencies upon which it relies.</p><p>The second is that Alpine uses <a href="https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management">APK</a> instead of Apt. APK, while a little different from Apt, follows similar conventions to other Linux package managers, such as <em>Yum</em>, <em>ZYpp</em>, and <em>Portage</em>. While I’ve been using Apt for over ten years, transitioning to APK wasn’t that difficult, as its commands are pretty intuitive.</p><p>That said, if you have scripts for building images, you’ll have to refactor them to use APK commands and package names instead, which will take a little bit of time. However, it should be a, relatively, straight-forward process.</p><h4>Three: Use as Few Layers As Possible</h4><p>How many layers compose your Docker image? Layers?, you may be asking. If you’re not familiar, every Docker image is composed of several layers, one for each command in a Dockerfile (and those in its base image).</p><pre>FROM php:7.0-apache</pre><pre>COPY ./ /var/www/html/</pre><pre>RUN chown -R www-data:www-data /var/www/html \<br> &amp;&amp; chown www-data:www-data /var/www<br>RUN apt-get -y update<br>RUN apt-get install -y libmcrypt-dev libzip-dev libpng12-dev libicu-dev libxml2-dev wget build-essential<br>RUN apt-get install -y git vim<br>RUN apt-get install -y npm nodejs-legacy</pre><p>In the example Dockerfile above, the resulting Docker image will be composed of 7 layers, in addition to any layers in the base image. Building Docker images in this way allows Docker to be as efficient as possible.</p><p>If a change is made in one layer, then only that layer needs to be changed. Every other layer can be fetched from cache.<br>That way, build times are as quick as possible.</p><p>To know how many layers your image is composed of, and how large they are, run the docker history command, as in the following example:</p><pre>docker history ze-php7.1.11-alpine<br>IMAGE CREATED CREATED BY SIZE COMMENT<br>5e0644e052e4 7 days ago /bin/sh -c #(nop) ENTRYPOINT [“/bootstrap… 0B<br>6791d155bd2e 7 days ago /bin/sh -c #(nop) EXPOSE 80/tcp 0B<br>6db0e80c9902 7 days ago /bin/sh -c #(nop) COPY dir:67f62ca0a16622f… 12MB<br>b53ae8739f99 7 days ago /bin/sh -c chmod +x /bootstrap/start.sh 10.1kB<br>9fe7fa43babf 7 days ago /bin/sh -c #(nop) ADD file:9fef33a371bdaef… 10.1kB<br>70949f1e3e70 7 days ago /bin/sh -c mkdir /app &amp;&amp; mkdir /app/public… 0B<br>969f39e455b7 7 days ago /bin/sh -c mkdir /run/apache2 &amp;&amp; sed -… 17.8kB<br>6cfc7b7d4a34 7 days ago /bin/sh -c apk — no-cache update &amp;&amp; apk … 70.6MB<br>946e205f9ff5 7 days ago /bin/sh -c echo “<a href="http://dl-cdn.alpinelinux/">http://dl-cdn.alpinelinux</a>… 149B<br>7bb295030e89 7 days ago /bin/sh -c #(nop) LABEL maintainer=Paul S… 0B<br>72dfe9e82e16 3 weeks ago /bin/sh -c #(nop) CMD [“/bin/sh”] 0B<br>&lt;missing&gt; 3 weeks ago /bin/sh -c #(nop) ADD file:682bfba4bfda1ed… 4.15MB</pre><p>There, you can see that it’s composed of twelve layers. For each layer you can see:</p><ul><li>The layer’s unique hash.</li><li>When that layer was created.</li><li>The command that created it.</li><li>The layer’s size.</li></ul><p>If you want to see an image’s combined size, use the docker images command, as in this example:</p><pre>docker images ze-php7.1.11-alpine<br>REPOSITORY TAG IMAGE ID CREATED SIZE<br>ze-php7.1.11-alpine latest 5e0644e052e4 7 days ago 86.8MB</pre><p>Then there’s the next aspect of how layers work. Referring again to the Dockerfile example above, notice the last three RUN commands. I’ve deliberately split up three calls to apt-get install to highlight this point.</p><p>It first installs the required development packages, which subsequent packages depend on. It then installs several system binaries. Finally, it installs the application’s software packages.</p><p>Working this way might make sense during development, as the Dockerfile’s easy to read and is ordered logically. However, while it might be logical, it will result in a larger image than if those steps were combined.</p><p>Moreover, gets even worse. Do you install packages in one RUN command only to remove them after a following RUN command? You may wonder what the problem is, as the packages are ultimately deleted. Well, no they’re not.</p><p>They’re deleted in a later layer — but they still exist in the one where they were installed! You see, anything that exists in one layer isn’t removed in a later one, it’s only covered over, so that following layers can’t see it, and that it appears as though it doesn’t exist.</p><p>It gets back to the point about caching that I spoke of earlier.<br>That’s why:</p><ol><li>It’s better not to install a package in the first place if you don’t need it.</li><li>Don’t install a package in the first place if you can avoid it.</li></ol><p>How we could do this? Well, here are four ways:</p><ol><li>Develop the Dockerfile in logically separated blocks, but compact it in the final version.</li><li>Don’t create files if you don’t have to — use streams and pipes as much as possible.</li><li>Remove unnecessary files, such as cache files, or don’t use the cache in the first place.</li><li>If you have to install files, use the smallest one possible.</li></ol><p>Let’s see some of those in practice:</p><pre># Add basics first<br>RUN apk — no-cache update \<br> &amp;&amp; apk upgrade \<br> &amp;&amp; apk — no-cache add apache2 ca-certificates openntpd php7 php7-apache2 php7-sqlite3 php7-tokenizer \<br> &amp;&amp; cp /usr/bin/php7 /usr/bin/php \<br> &amp;&amp; rm -f /var/log/apache/*</pre><p>Here, you can see that I’ve combined the cache update and upgrade commands with the add command, by doing so, it’s not downloaded any extra files to the filesystem. Then, those commands were combined with the cp and rm command, which took care of some housekeeping and cleared out any unnecessary files.</p><p>Do some experimenting and see how you can compact your Dockerfile configurations.</p><h4>Four: Use .dockerignore files</h4><p>Referring back to the earlier Dockerfile example again, remember that it copied everything in its context into the images /var/www/html directory, in the second command? Are all those files necessary? Could some of them have been avoided?</p><p>If so, and it’s likely the case that some could have been, then do so by using [<a href="https://docs.docker.com/engine/reference/builder/#dockerignore-file">a .dockerignore file</a>. These files, as their name implies, instruct Docker that specific files can be ignored.</p><p>If you’re familiar with <a href="https://git-scm.com/docs/gitignore">.gitignore files</a>, then you’ll know what I mean. If not, have a look at the example below.</p><pre>vendor<br>.idea<br>data<br>mysql</pre><p>Using this configuration Docker would not copy any files in the <em>vendor</em>, <em>.idea</em>, <em>data</em>, or <em>mysql</em> directories of my project, saving both time and space in the process. .dockerignore files are convenient, and I strongly encourage you to become a whiz with them.</p><h4>Five: Squash Docker Images</h4><p>The last tip I want to offer is on squashing Docker images.<br>The idea here is that after your image is created, you then flatten it as much as possible, using a tool such as <a href="https://github.com/jwilder/docker-squash">docker-squash</a>.</p><blockquote>Docker-squash is a utility to squash multiple docker layers into one to create an image with fewer and smaller layers. It retains Dockerfile commands such as PORT, ENV, etc.. so that squashed images work the same as they were originally built. In addition, deleted files in later layers are actually purged from the image when squashed.</blockquote><p>The idea is that your image is as small as possible so that when it’s transferred, it’s as quick as is possible. However, while the concept is quite appealing, I was never able to use it effectively.</p><p>Perhaps it’s something to do with running it on macOS versus on a Linux distribution, but despite leaving it running for over an hour on a small image, there seemed no end in sight as to when the process would complete.</p><p>Given that, while using docker-squash might drastically reduce my Docker image sizes, saving precious time pulling down and pushing up images, this time saving seems outweighed by the time to squash the image in the first place.</p><p>However, your mileage may vary, and I’m entirely new to the tool. So if you’ve found success with it, or a related tool, please share your thoughts in the comments.</p><h4>In Conclusion</h4><p>Those were five steps that you can take to reduce the size of your Docker images. One or a combination of them will reduce the size of your Docker images.</p><p>Some of them will reduce image sizes more than others, so always compare the size before and after using each one.</p><p>Also, the size reductions of each step is heavily dependent on some of the others and what your image needs to do. So please keep that in mind.</p><p>With that said, I encourage you to foster a spirit of healthy competition in seeing just how small, just how compact your Docker images can become.</p><p>I’d love to see us return to earlier times when we used as few resources as possible before disc space and bandwidth became so cheap, and some of us became quite lax and stopped caring.</p><p>Perhaps, together, we can encourage others to follow our lead.<br>I hope so. That said, try out each of the five tips, and share your progress in the comments.</p><p>If you have others which you use on a regular basis, please share them. I’d love to learn from you as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f4bd68d29f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codacy/five-ways-to-slim-your-docker-images-5f4bd68d29f1">Five Ways to Slim Your Docker Images</a> was originally published in <a href="https://medium.com/codacy">Codacy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Use Docker To Simplify Writing Multi-distro Shell Scripts]]></title>
            <link>https://medium.com/@settermjd/how-to-use-docker-to-simplify-writing-multi-distro-shell-scripts-4eecb094ce0a?source=rss-d8be98cdccce------2</link>
            <guid isPermaLink="false">https://medium.com/p/4eecb094ce0a</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[owncloud]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Matthew Setter]]></dc:creator>
            <pubDate>Sat, 09 Dec 2017 11:06:41 GMT</pubDate>
            <atom:updated>2017-12-09T11:07:54.778Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you write Linux shell scripts? Do your scripts work on more than one distribution? If so what does your development environment look like and what tools do you use to let you develop, debug, and maintain your scripts both quickly and relatively hassle-free?</p><p>The reason that I ask that I’ve been tearing through recently. As a result, I’ve gained a new lease on life <a href="https://matthewsetter.com/portfolio">as a technical writer</a> — and as a developer.</p><p>This isn’t to say that I didn’t have a strong professional work ethic or solid experience prior to reading the book. It’s that since I’ve begun reading it, I’ve felt so much more confident in how I undertake the role than I have been up until now.</p><p>Specifically, I only document and approve PR’s about topics that I’ve personally tested. If I’m not sure they work, they don’t get my approval.</p><h3>This might sound strange</h3><p>However, like unit testing or security best practices in software, sometimes you can feel under pressure from deadlines to get things done quicker than you should, effectively rushing things through without being 100% sure that they work.</p><p>So it was recently when I was going through <a href="https://doc.owncloud.org/server/latest/admin_manual/installation/source_installation.html">the manual installation section of the ownCloud administration documentation</a>. I started a quick run through of the steps outlined in response to a new issue only to find that:</p><p>1. Some details were missing.<br>2. Some were wrong (likely outdated).</p><p>These omissions and errors meant there was room for doubt and error — especially for newer ownCloud users.</p><p>What’s more, while code samples are very helpful (you don’t have to figure out what you have to type) they still leave so much work for the user, as they have to copy and paste the code examples into their terminal manually.</p><h3>Let’s Make The User’s Life Easier with a Script</h3><p>As we’re attempting to help them save time and effort, why not provide a script that they can use as part of a build process, one able to be scheduled via Cron?</p><p>So despite (or in spite of) the factual errors and omissions, I became excited at the prospect of revising the documentation. Now I could have raised an issue with the core development team to create the script, detailing what it should do when it was ready.</p><p>However, I’m not only a technical writer, I’m also <a href="https://github.com/settermjd">a software developer</a>. And what do developers love to do more than most else? <strong>Design and write code!</strong></p><p>So it was that I started designing a shell script that would automate the process of installing all of ownCloud’s dependencies.</p><h3>The Script Outline</h3><p>The first thing to do was to assess what it needed to do and the environment in which it would run. As I already knew what it had to do, using the documentation as my guide, I moved on to assessing the environment requirements.</p><p>Currently, <a href="http://admin.manual.localdomain/installation/system_requirements.html#officially-recommended-supported-options">ownCloud officially supports several Linux distributions</a>. These are:</p><ul><li>Ubuntu 16.04</li><li>Debian 7 and 8</li><li>SUSE Linux Enterprise Server 12 and 12 SP1</li><li>Red Hat Enterprise Linux/Centos 6.5 and 7</li></ul><p>So when the script was finished, it had to achieve the same outcome, regardless of which distribution it was run on.</p><p>A bash shell script seemed to make the most sense. I could have written it in <em>Ruby</em>, <em>Python</em>, or <em>PHP</em>. However, I always associated shell scripts with SysAdmin &amp; DevOps work. What’s more, I had an itch to scratch!</p><p>Here’s an admission: I’ve been a bash script hacker since 1999. But I’ve never actually developed my proficiency past a certain point.</p><p>So I saw this as an opportunity to grow my skills and learn more about bash while indulging one of my oldest, technical, passions: <strong>Linux</strong>. On top of that, I’ve long been curious about how the different distributions organise themselves.</p><p>And so the decision was made. Then came the next question:</p><blockquote>How would I make it portable, yet not spend more time than was necessary provisioning the different Linux distributions?</blockquote><p>VirtualBox, Vagrant, and a provisioner such as Ansible seemed out of the question. If I went down that path, I’d likely spend more time writing the provisioning scripts than writing the actually setup script — which was my main focus!</p><p>So I chose to go with Docker instead, as it demands only a limited amount of time and effort to get an environment up and going.</p><p>Given that, I created a custom Docker setup, [based largely on an existing project](), which [you can find on GitHub](). In it, you can see that it uses Docker-Compose to create a two-container setup.</p><p>There’s a web service that provides Apache 2 and PHP 7. And there’s a MySQL container that, <em>surprise</em>, provides MySQL.</p><p>The web service uses any one of three Dockerfiles, which are based on a different base image. There’s one for <em>Ubuntu</em>, <em>openSUSE Leaf 42.3</em>, and <em>CentOS 7</em>.</p><p>Each of them installs a set of packages, sets up a user &amp; group, and sets up some permissions on a required directory so that that user can access it.</p><p>While they don’t do a lot, they’s still essential. By using them, I was able to write a shell script that achieved the same outcome across each distribution. The script doesn’t actually do a lot. But, here’s a quick summary:</p><ol><li>Check that the user isn’t root.</li><li>Make sure the directory is readable and writable by the web user.</li><li>Install the required packages.</li><li>Run the installer.</li></ol><p>Doing so taught me:</p><ul><li>What could stay the same</li><li>What had to be changed</li><li>Other changes in the environment</li></ul><p>Interestingly, the key step was determining which distribution was being used, so that the script knew which package manager to use to install the required packages, and what the packages were called.</p><p>This was done with two functions: which_distro and install_required_packages.</p><h3>Function 1: which_distro</h3><pre>function which_distro()<br>{<br>  case “$( grep -Eoi ‘Debian|SUSE|Ubuntu’ /etc/issue )” in<br>    “SUSE”)<br>    echo “SUSE”<br>  ;;<br> <br>  “Ubuntu”)<br>    echo “Ubuntu”<br>  ;;<br>  <br>  esac</pre><pre>  redhat_release_file=/etc/redhat-release</pre><pre>  # Need to do a bit more work to detect RedHat-based distributions<br>  if [ -e “$redhat_release_file” ]; then<br>    case “$( grep -Eoi ‘CentOS’ $redhat_release_file )” in<br> “CentOS”)<br>    echo “CentOS”<br>  ;;<br>  esac<br> fi<br>}</pre><p>The function first greps /etc/issue for one of <em>Debian</em>, <em>SUSE</em>, or <em>Ubuntu</em>. If it contains one of the three strings, then we know its that distribution. I did this because I’ve found that these distributions consistently show themselves there.</p><p>Determining if the distribution was RedHat or CentOS was a bit harder, as these two don’t always store the identifying information consistently in /etc/issue.</p><p>They can store it there. But they can also store it in /proc/version as well as /etc/redhat-release. /etc/redhat-release seems to be the most consistent approach.</p><p>Given that, if /etc/redhat-release is available, then we know that one of the two distributions is being used. From there, the script greps for which of them it is, similar to the previous approach.</p><h3>Function 2: install_required_packages</h3><pre>function install_required_packages()<br>{<br>  case </pre><pre>    &quot;$( which_distro )&quot; in &quot;SUSE&quot;) <br>      echo &quot;Installing required packages on SUSE&quot;<br>      install_required_suse_packages<br>    ;;<br> <br>    &quot;Ubuntu&quot;|&quot;Debian&quot;) <br>      echo &quot;Installing required packages on Ubuntu/Debian&quot;<br>      install_required_ubuntu_debian_packages<br>    ;;</pre><pre>    &quot;CentOS&quot;) <br>      echo &quot;Installing required packages on Centos&quot;<br>      install_required_centos_packages<br>    ;;</pre><pre>  esac<br>}</pre><p>The second script just uses which_distro to determine which distribution is being used, and then:</p><ol><li>Provide visual confirmation to the user about which distribution it’s going to install the packages for.</li><li>Calls a distribution-specific function to install the required packages.</li></ol><p>Now for the more interesting part, the distribution-specific installers.</p><h3>Ubuntu/Debian</h3><p>I started off with Ubuntu/Debian. I’ve got the most experience with them as I’ve been using them since about 2003. What’s heartening is that it was the distribution that required the least amount of effort.</p><p>I know a number of the idioms and quirks, so perhaps I’m biased. But it took the least amount of effort.</p><pre>function install_required_ubuntu_debian_packages()<br>{<br> sudo apt-get -y -q update &amp;&amp; \<br> apt-get install -y -q wget make npm \<br> nodejs nodejs-legacy unzip git<br>}</pre><h3>openSUSE</h3><p>I then refactored the script to work with openSUSE. To be honest, while I live in Nuremberg, the hometown of SUSE I think, I’ve barely used it.</p><p>What’s more, it took the most amount of effort to code. While the changes largely only reflect using <a href="https://en.opensuse.org/Portal:Zypper">Zypper</a> instead of Apt, it took some experimenting to both get the base environment working and to find the combination of packages and dependencies.</p><pre>function install_required_suse_packages()<br>{<br> sudo zypper — quiet — non-interactive install \<br> wget make nodejs6 nodejs-common \<br> unzip git npm6 phantomjs<br>}</pre><h3>Centos</h3><p>Finally, I added an installer for CentOS. While it looks quite large by lines of code, it took less effort than openSUSE. It took time to figure out how to get <a href="http://phantomjs.org/">PhantomJS</a> up and going to be fair, but not all that much.</p><pre>function install_required_centos_packages()<br>{<br>  sudo yum update -q -y<br>  sudo yum — enablerepo=cr -q -y install \ <br>    wget make nodejs unzip git npm bzip2 file</pre><pre>  # Install PhantomJS — see <a href="https://www.bonusbits.com/wiki/HowTo:Install_PhantomJS_on_CentOS">https://www.bonusbits.com/wiki/HowTo:Install_PhantomJS_on_CentOS</a><br> <br>  # It’s not in the official repos, so needs to be installed independently.<br> <br>  sudo yum install fontconfig freetype \ <br>    freetype-devel fontconfig-devel libstdc++<br> <br>  sudo mkdir -p /opt/phantomjs<br> wget <a href="https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2">https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2</a><br> <br>  sudo tar -jxvf phantomjs-2.1.1-linux-x86_64.tar.bz2 \<br>    — strip-components 1 — directory /opt/phantomjs/</pre><pre>  sudo ln -s /opt/phantomjs/bin/phantomjs /usr/bin/phantomjs<br>}</pre><h3>What About RHEL?</h3><p>At this stage, I’ve not completed refactoring the script to work with RHEL.<br>I expect to have that done later in the week.</p><h3>What Was Learned</h3><p>It’s been an interesting journey building a shell script that works across multiple Linux distributions. I learned some things, including:</p><ul><li>How distributions don’t necessarily do the same things in the same way.</li><li>How some packages are readily available across each distribution, while others you have to find and install all on your own.</li><li>How by using Docker, I wasted almost no time building each distribution. This cemented for me why it’s my preferred approach <a href="http://www.masterzendframework.com/docker-from-development-to-deployment/">to setting up and deploying software</a>.</li></ul><p>While it’s frustrating that each distribution doesn’t provide the packages that each other does, it makes sense. They’re created by different people, to serve different audiences and needs.</p><p>It makes no sense for them to be identical. And it’s something to keep in mind when you’re writing shell scripts. It may save you a lot of confusion and frustration.</p><p>And that’s been a whirlwind run through of both how Docker’s helped me create a shell script that works across multiple Linux distributions, as well as a bit of a step-through of the relevant sections of the script.</p><p>If you’re a bash expert I’d love to know how you would improve or change the script. I’d love to know if there are better ways, quicker ways, easier ways to do it.</p><p>Please leave your feedback in the comments or <a href="https://github.com/owncloud/core/pull/28854">the discussion of the script on GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4eecb094ce0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>