Skip to content

Instantly share code, notes, and snippets.

View adotcoop's full-sized avatar

Andrew Cooper adotcoop

View GitHub Profile

Cyber Essentials Scheme History 2011-2023

This page brings together the key dates and documents relating to the UK Governments Cyber Essentials Scheme. Where possible links are to the National Archives versions of the historic government websites.

When reviewing historic documents care should be taken to understand how the scheme was organised and run prior to 2020.

The scheme originated in the 2011 UK Cyber Security Strategy which mentioned encouraging the development of a cyber 'kite-mark'. A consultation in 2013 was carried out and concluded that no existing cyber standard would meet their requirements - a new one would therefore need to be created.

Shortly before launch it was reported in multiple outlets that it would be a 3-tier scheme:

# Find-log4j.ps1
#
# Searches a machine for files named log4j-core-*.jar using robocopy and outputs to a file
#
# Virtually all of the code is from Matt Benninge; I've just added a very simple file output
# https://gist.github.com/matbe/df32f7257d9eab07fb388bef85edab04
#
# Once you have the files you can combine the ones that found log4j using
#
# dir *_found* | Get-Content | Out-File c:\users\public\log4jfound.txt
$ProgressPreference = 'SilentlyContinue'
mkdir C:\Apps -Force
# Download the bootstrapper
Invoke-WebRequest -UseBasicParsing -URI https://miktex.org/download/win/miktexsetup-x64.zip -OutFile C:\Apps\miktexsetup-x64.zip
Expand-Archive C:\Apps\miktexsetup-x64.zip -DestinationPath C:\Apps\miktex
# Call the bootstrapper to download the remaining source packages
# Get latest download URI for LTR and latest version of QGIS
# parses the website configuration from github, not scraping the html so should be a bit more reliable
$uri = "https://raw.githubusercontent.com/qgis/QGIS-Website/master/source/schedule.py"
$Content = (Invoke-WebRequest -UseBasicParsing -Uri $uri).Content
try {
$StringData = [RegEx]::Matches($Content, ".*=.*")
$Details = $StringData -Replace ("'", "") | ConvertFrom-StringData
@adotcoop
adotcoop / Get-TableauApps.ps1
Last active July 12, 2021 11:08
Get version and url for tableau products using url redirects
# version match regex
$matchversion = "(\d+(\-\d+){1,3})"
# tableau reader
$tr = Invoke-WebRequest -UseBasicParsing -Uri "https://www.tableau.com/downloads/reader/pc64" -MaximumRedirection 0 -ErrorAction Ignore
$trversion = [RegEx]::Match($tr.Headers.Location, $matchversion) | Select-Object -ExpandProperty Value -Unique
$tr.Headers.Location
$trversion.Replace('-','.')
@adotcoop
adotcoop / Get-BlueJ.ps1
Last active June 12, 2023 23:14
Returns url of latest version of BlueJ for Windows
# To discover this had to run fiddler and check for updates within the app
# To force bluej through a web proxy had to add this to C:\Program Files\BlueJ\lib\bluej.defs
# bluej.windows.vm.args=-Djavafx.embed.singleThread=true -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888
$download = "https://www.bluej.org/download/files/BlueJ-windows-$($ver).msi"
$Updatefeed = Invoke-WebRequest -UseBasicParsing -uri http://www.bluej.org/version.info
$Updates = [System.Text.Encoding]::UTF8.GetString($Updatefeed.Content)
$LatestVersion = $updates.split([Environment]::NewLine)[0]
@adotcoop
adotcoop / Get-Tableau.ps1
Created June 25, 2021 15:55
Gets the urls of the latest verisons of tableau products
$download = "https://downloads.tableau.com"
[xml]$tableau = (Invoke-WebRequest -UseBasicParsing -uri https://downloads.tableau.com/TableauAutoUpdate.xml).Content
$Versions = $tableau.versions.version.name
$LatestVersion = $tableau.versions.version | `
Sort-Object -Property @{ Expression = { [System.Version]$_.name }; Descending = $true } | `
Select-Object -First 1
$windowsvers = $latestversion.Installer | where name -match "exe"
@adotcoop
adotcoop / Get-PostgreSQL.ps1
Created June 25, 2021 14:03
Get the latest release date and url for the Windows version of PostgreSQL
$postgres = Invoke-WebRequest -UseBasicParsing -uri https://www.postgresql.org/versions.json | ConvertFrom-Json
$LatestVersion = $postgres | Where-Object current -eq "True"
$releaseDate = $LatestVersion.relDate
$url = "https://get.enterprisedb.com/postgresql/postgresql-$($LatestVersion.major).$($LatestVersion.latestMinor)-2-windows-x64.exe"
@adotcoop
adotcoop / Get-AndroidStudio.ps1
Created June 22, 2021 16:28
Test code to figure out latest version and download url of Android Studio for Windows
# Test code to figure out latest version and download url of Android Studio for Windows
# https://developer.android.com/studio
$xml = Invoke-WebRequest -UseBasicParsing -Uri "https://dl.google.com/android/studio/patches/updates.xml"
$release = "AI-2-release"
$node = ([xml]$xml.Content).products.product.channel | Where-Object { $_.id -eq $release }
$version = ($node.build.version)
$shortBuildNumber = ($node.build.number).Split('.')[0].Split('-')[1]