SlideShare a Scribd company logo
© 2024 - Atsign | docs.atsign.com
Showing that you care about security -
OpenSSF Scorecards for Dart and Flutter projects
Fluttercon - Jun 2024
© 2024 - Atsign | docs.atsign.com
© 2024 - Atsign | docs.atsign.com
© 2024 - Atsign | docs.atsign.com
Hi, I’m Chris
@cpswan
https://chris.swanz.net
© 2024 - Atsign | docs.atsign.com
Agenda
➔ The Dart and Flutter inspiration
➔ Who are OpenSSF, and what is a scorecard?
➔ Start with Allstar
➔ Doing your first repository
➔ Scaling across multiple repositories
➔ 80:20
➔ The toil of it all
The Dart and Flutter inspiration
© 2024 - Atsign | docs.atsign.com
https://opensource.googleblog.com/2022/06/Dart-and-Flutter-enable-Allstar-and-Security-Scorecards.html
© 2024 - Atsign | docs.atsign.com
https://github.com/flutter/flutter
Who are OpenSSF,
and what is a scorecard?
© 2024 - Atsign | docs.atsign.com
https://openssf.org/
© 2024 - Atsign | docs.atsign.com
Start with Allstar
© 2024 - Atsign | docs.atsign.com
https://github.com/ossf/allstar
A whole bunch of config, and a whole bunch of files
Doing your first repository
Expect LOTS of issues
Help is at hand
Dependency (pinning) hell cont…
Scaling across multiple repositories
Rinse and repeat - more of this
And more of this
80:20
It’s relatively easy to get most stuff right
There will be a residue
How this looks to your users
Radar plot
Static analysis with osv-scanner
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 # v1.6.4
with:
sdk: stable
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: 'stable'
cache-dependency-path: tools/osv-scanner/go.sum
- name: Run osv-scanner
working-directory: packages/${{ matrix.package }}
run: |
dart pub get
go install github.com/google/osv-scanner/cmd/osv-scanner@6316373e47d...
osv-scanner --lockfile=./pubspec.lock
This is where it gets really gnarly
The questionnaire is long and detailed
And some sections might be hard to accomplish
The toil of it all
Make friends with the new boss
From a docs repo (no actual code to maintain)
From a code repo
Scorecard’s own dependencies can change with
annoying regularity (in every repo with a scorecard)
Base dependencies can be amplified
Use the directories capability, and groups
- package-ecosystem: "pub"
directories:
- "/packages/dart/sshnoports/"
- "/packages/dart/sshnp_flutter/"
schedule:
interval: "daily"
groups:
pub:
patterns:
- "*"
It might still help to do rollups: rollup.sh
#!/bin/bash
if [ $# -ne 2 ] ; then
echo "Usage rollup.sh <BASE_PR> <LAST_PR>"
exit 1
fi
BASE_PR=$1
LAST_PR=$2
git pull
gh pr checkout "$BASE_PR"
for (( i=(($BASE_PR + 1)); i<=$LAST_PR; i++ ))
do
PR_BRANCH=$(gh pr view "$i" --json headRefName -q .headRefName)
git merge origin/"$PR_BRANCH" -m 
"build(deps): Rollup merge branch for #${i} ${PR_BRANCH}"
done
git push
Bonus content:
SBOMs and SLSA
Generating Software Bill of Materials (SBOM)
- name: Checkout pubspec.lock
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
sparse-checkout: packages/dart/sshnoports/pubspec.lock
sparse-checkout-cone-mode: false
- name: Install Syft
uses: anchore/sbom-action/download-syft@7ccf588e3cf3cc2611714c2eeae48550fbc17552
- name: Generate SBOMs
run: |
syft scan file:./packages/dart/sshnoports/pubspec.lock 
-o 'spdx-json=tarballs/dart_sshnoports_sbom.spdx.json' 
-o 'cyclonedx-json=tarballs/dart_sshnoports_sbom.cyclonedx.json'
Make the SBOM with Syft, understand it with GUAC
https://github.com/anchore/syft https://guac.sh/
Generate hashes and build attestation
- name: Generate SHA256 checksums
working-directory: tarballs
run: sha256sum * > checksums.txt
- id: hash
name: Pass artifact hashes for SLSA provenance
working-directory: tarballs
run: |
echo "hashes=$(cat checksums.txt | base64 -w0)" >> "$GITHUB_OUTPUT"
- uses: actions/attest-build-provenance@f8d5ea8082b0d9f5… # v1.1.0
with:
subject-path: 'tarballs/**'
In the GitHub Actions run for a build:
Clicking through to an attestation
Generate hashes and build attestation:
Supply-chain Levels for Software Artifacts (SLSA)
provenance:
needs: [github-release]
permissions:
actions: read # Needed for detection of GitHub Actions environment.
id-token: write # Needed for provenance signing and ID
contents: write # Needed for release uploads
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0
with:
base64-subjects: "${{ needs.github-release.outputs.hashes }}"
upload-assets: true
Peeking inside SLSA attestation: multiple.intoto.jsonl
{
"_type": "https://in-toto.io/Statement/v0.1",
"predicateType": "https://slsa.dev/provenance/v0.2",
"subject": [
{
"name": "dart_sshnoports_sbom.cyclonedx.json",
"digest": {
"sha256": "017532bc7a01a0249211819be5858bc76cf4db7824e0e6432dd0831983948094"
}
},
{
"name": "dart_sshnoports_sbom.spdx.json",
"digest": {
"sha256": "013bff32cd7c776e54c36db692aceadce13d28839c06ec1b8ed23421edf305e1"
}
},
The software supply chain trifecta
© 2024 - Atsign | docs.atsign.com
Review
➔ Our journey started with adoption by the Dart/Flutter team.
➔ An OpenSSF Scorecard can show you care about security.
➔ Allstar provides a good starting point.
➔ Pick a first repo to get a hang of what’s needed.
➔ Then automate across the rest of the organisation.
➔ 20% of the effort to get 80% of the score. Uphill from there.
➔ Scorecards do create ongoing toil that needs to be minimised.
© 2024 - Atsign | docs.atsign.com
Call to action: Run the scorecard CLI against one of
your own repos
https://github.com/ossf/scorecard#
scorecard-command-line-interface
Resources
Blog posts
https://blog.thestateofme.com/2022/12/02/implementing-ossf-scorecard
s-across-a-github-organisation/
https://blog.thestateofme.com/2023/03/09/roll-up-rollup-get-your-depe
ndabot-prs-together-here/
atGitHub
https://github.com/atsign-foundation/.github/blob/trunk/docs/atGitHub.md
Varun Sharma’s (Step Security) QCon Demo Org
https://github.com/qcon-demo-org
Thanks for your time
chris@atsign.com
@cpswan
Questions?

More Related Content

Similar to Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards for Dart and Flutter projects

4Developers 2015: Continuous Security in DevOps - Maciej Lasyk
4Developers 2015: Continuous Security in DevOps - Maciej Lasyk4Developers 2015: Continuous Security in DevOps - Maciej Lasyk
4Developers 2015: Continuous Security in DevOps - Maciej Lasyk
PROIDEA
 
Continuous Security in DevOps
Continuous Security in DevOpsContinuous Security in DevOps
Continuous Security in DevOps
Maciej Lasyk
 
DWX 2022 - DevSecOps mit GitHub
DWX 2022 - DevSecOps mit GitHubDWX 2022 - DevSecOps mit GitHub
DWX 2022 - DevSecOps mit GitHub
Marc Müller
 
Azure from scratch part 4
Azure from scratch part 4Azure from scratch part 4
Azure from scratch part 4
Girish Kalamati
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
Arto Artnik
 
Let's build Developer Portal with Backstage
Let's build Developer Portal with BackstageLet's build Developer Portal with Backstage
Let's build Developer Portal with Backstage
Opsta
 
2018 the conf put git to work - increase the quality of your rails project...
2018 the conf   put git to work -  increase the quality of your rails project...2018 the conf   put git to work -  increase the quality of your rails project...
2018 the conf put git to work - increase the quality of your rails project...
Rodrigo Urubatan
 
Introduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateIntroduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release update
Alex Pop
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
SV Ruby on Rails Meetup
 
An API Your Parents Would Be Proud Of
An API Your Parents Would Be Proud OfAn API Your Parents Would Be Proud Of
An API Your Parents Would Be Proud Of
Jose Alfredo Alvarez Aldana
 
Make stateful apps in Kubernetes a no brainer with Pure Storage and GitOps
Make stateful apps in Kubernetes a no brainer with Pure Storage and GitOpsMake stateful apps in Kubernetes a no brainer with Pure Storage and GitOps
Make stateful apps in Kubernetes a no brainer with Pure Storage and GitOps
Weaveworks
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
Bo-Yi Wu
 
2018 RubyHACK: put git to work - increase the quality of your rails project...
2018 RubyHACK:  put git to work -  increase the quality of your rails project...2018 RubyHACK:  put git to work -  increase the quality of your rails project...
2018 RubyHACK: put git to work - increase the quality of your rails project...
Rodrigo Urubatan
 
SF Gradle Meetup - Netflix OSS
SF Gradle Meetup - Netflix OSSSF Gradle Meetup - Netflix OSS
SF Gradle Meetup - Netflix OSS
Justin Ryan
 
Building Hadoop Data Applications with Kite
Building Hadoop Data Applications with KiteBuilding Hadoop Data Applications with Kite
Building Hadoop Data Applications with Kite
huguk
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript Applications
Lewis Ardern
 
Docker for Ruby Developers
Docker for Ruby DevelopersDocker for Ruby Developers
Docker for Ruby Developers
Aptible
 
Everything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLEverything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPL
Mario-Leander Reimer
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
QAware GmbH
 
Rugged Driven Development with Gauntlt
Rugged Driven Development with GauntltRugged Driven Development with Gauntlt
Rugged Driven Development with Gauntlt
James Wickett
 

Similar to Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards for Dart and Flutter projects (20)

4Developers 2015: Continuous Security in DevOps - Maciej Lasyk
4Developers 2015: Continuous Security in DevOps - Maciej Lasyk4Developers 2015: Continuous Security in DevOps - Maciej Lasyk
4Developers 2015: Continuous Security in DevOps - Maciej Lasyk
 
Continuous Security in DevOps
Continuous Security in DevOpsContinuous Security in DevOps
Continuous Security in DevOps
 
DWX 2022 - DevSecOps mit GitHub
DWX 2022 - DevSecOps mit GitHubDWX 2022 - DevSecOps mit GitHub
DWX 2022 - DevSecOps mit GitHub
 
Azure from scratch part 4
Azure from scratch part 4Azure from scratch part 4
Azure from scratch part 4
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Let's build Developer Portal with Backstage
Let's build Developer Portal with BackstageLet's build Developer Portal with Backstage
Let's build Developer Portal with Backstage
 
2018 the conf put git to work - increase the quality of your rails project...
2018 the conf   put git to work -  increase the quality of your rails project...2018 the conf   put git to work -  increase the quality of your rails project...
2018 the conf put git to work - increase the quality of your rails project...
 
Introduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateIntroduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release update
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
 
An API Your Parents Would Be Proud Of
An API Your Parents Would Be Proud OfAn API Your Parents Would Be Proud Of
An API Your Parents Would Be Proud Of
 
Make stateful apps in Kubernetes a no brainer with Pure Storage and GitOps
Make stateful apps in Kubernetes a no brainer with Pure Storage and GitOpsMake stateful apps in Kubernetes a no brainer with Pure Storage and GitOps
Make stateful apps in Kubernetes a no brainer with Pure Storage and GitOps
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
2018 RubyHACK: put git to work - increase the quality of your rails project...
2018 RubyHACK:  put git to work -  increase the quality of your rails project...2018 RubyHACK:  put git to work -  increase the quality of your rails project...
2018 RubyHACK: put git to work - increase the quality of your rails project...
 
SF Gradle Meetup - Netflix OSS
SF Gradle Meetup - Netflix OSSSF Gradle Meetup - Netflix OSS
SF Gradle Meetup - Netflix OSS
 
Building Hadoop Data Applications with Kite
Building Hadoop Data Applications with KiteBuilding Hadoop Data Applications with Kite
Building Hadoop Data Applications with Kite
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript Applications
 
Docker for Ruby Developers
Docker for Ruby DevelopersDocker for Ruby Developers
Docker for Ruby Developers
 
Everything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLEverything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPL
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
 
Rugged Driven Development with Gauntlt
Rugged Driven Development with GauntltRugged Driven Development with Gauntlt
Rugged Driven Development with Gauntlt
 

More from Chris Swan

LNETM - Atsign - Privacy with Personal Data Services
LNETM - Atsign - Privacy with Personal Data ServicesLNETM - Atsign - Privacy with Personal Data Services
LNETM - Atsign - Privacy with Personal Data Services
Chris Swan
 
SOOCon24 - Showing that you care about security - OpenSSF Scorecards
SOOCon24 - Showing that you care about security - OpenSSF ScorecardsSOOCon24 - Showing that you care about security - OpenSSF Scorecards
SOOCon24 - Showing that you care about security - OpenSSF Scorecards
Chris Swan
 
Fluttercon Berlin 23 - Dart & Flutter on RISC-V
Fluttercon Berlin 23 - Dart & Flutter on RISC-VFluttercon Berlin 23 - Dart & Flutter on RISC-V
Fluttercon Berlin 23 - Dart & Flutter on RISC-V
Chris Swan
 
Flutter SV Meetup Oct 2022 - End to end encrypted IoT with Dart and Flutter
Flutter SV Meetup Oct 2022 - End to end encrypted IoT with Dart and FlutterFlutter SV Meetup Oct 2022 - End to end encrypted IoT with Dart and Flutter
Flutter SV Meetup Oct 2022 - End to end encrypted IoT with Dart and Flutter
Chris Swan
 
QConSF 2022 - Backends in Dart
QConSF 2022 - Backends in DartQConSF 2022 - Backends in Dart
QConSF 2022 - Backends in Dart
Chris Swan
 
London IoT Meetup Sep 2022 - End to end encrypted IoT
London IoT Meetup Sep 2022 - End to end encrypted IoTLondon IoT Meetup Sep 2022 - End to end encrypted IoT
London IoT Meetup Sep 2022 - End to end encrypted IoT
Chris Swan
 
Flutter Vikings 2022 - End to end IoT with Dart and Flutter
Flutter Vikings 2022 - End to end IoT with Dart and FlutterFlutter Vikings 2022 - End to end IoT with Dart and Flutter
Flutter Vikings 2022 - End to end IoT with Dart and Flutter
Chris Swan
 
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
Chris Swan
 
Devoxx UK 2022 - Application security: What should the attack landscape look ...
Devoxx UK 2022 - Application security: What should the attack landscape look ...Devoxx UK 2022 - Application security: What should the attack landscape look ...
Devoxx UK 2022 - Application security: What should the attack landscape look ...
Chris Swan
 
Flutter Festival London 2022 - End to end IoT with Dart and Flutter
Flutter Festival London 2022 - End to end IoT with Dart and FlutterFlutter Festival London 2022 - End to end IoT with Dart and Flutter
Flutter Festival London 2022 - End to end IoT with Dart and Flutter
Chris Swan
 
Full Stack Squared 2022 - Power of Open Source
Full Stack Squared 2022   - Power of Open SourceFull Stack Squared 2022   - Power of Open Source
Full Stack Squared 2022 - Power of Open Source
Chris Swan
 
Flutter Vikings 2022 - Full Stack Dart
Flutter Vikings 2022  - Full Stack DartFlutter Vikings 2022  - Full Stack Dart
Flutter Vikings 2022 - Full Stack Dart
Chris Swan
 
Droidcon London 2021 - Full Stack Dart
Droidcon London 2021   - Full Stack DartDroidcon London 2021   - Full Stack Dart
Droidcon London 2021 - Full Stack Dart
Chris Swan
 
Keeping a project going
Keeping a project goingKeeping a project going
Keeping a project going
Chris Swan
 
Dart on Arm - Flutter Bangalore June 2021
Dart on Arm - Flutter Bangalore June 2021Dart on Arm - Flutter Bangalore June 2021
Dart on Arm - Flutter Bangalore June 2021
Chris Swan
 
TMS9995 on RC2014
TMS9995 on RC2014TMS9995 on RC2014
TMS9995 on RC2014
Chris Swan
 
CloudCamp London Nov 2019 Intro
CloudCamp London Nov 2019 IntroCloudCamp London Nov 2019 Intro
CloudCamp London Nov 2019 Intro
Chris Swan
 
DevSecOps Days London - Teaching 'Shift Left on Security'
DevSecOps Days London - Teaching 'Shift Left on Security'DevSecOps Days London - Teaching 'Shift Left on Security'
DevSecOps Days London - Teaching 'Shift Left on Security'
Chris Swan
 
Cooking with a touch of science and a dash of engineering
Cooking with a touch of science and a dash of engineeringCooking with a touch of science and a dash of engineering
Cooking with a touch of science and a dash of engineering
Chris Swan
 
Agile Enterprise Rome 2018 - Ops and Security in a PaaS and Serverless world
Agile Enterprise Rome 2018 - Ops and Security in a PaaS and Serverless worldAgile Enterprise Rome 2018 - Ops and Security in a PaaS and Serverless world
Agile Enterprise Rome 2018 - Ops and Security in a PaaS and Serverless world
Chris Swan
 

More from Chris Swan (20)

LNETM - Atsign - Privacy with Personal Data Services
LNETM - Atsign - Privacy with Personal Data ServicesLNETM - Atsign - Privacy with Personal Data Services
LNETM - Atsign - Privacy with Personal Data Services
 
SOOCon24 - Showing that you care about security - OpenSSF Scorecards
SOOCon24 - Showing that you care about security - OpenSSF ScorecardsSOOCon24 - Showing that you care about security - OpenSSF Scorecards
SOOCon24 - Showing that you care about security - OpenSSF Scorecards
 
Fluttercon Berlin 23 - Dart & Flutter on RISC-V
Fluttercon Berlin 23 - Dart & Flutter on RISC-VFluttercon Berlin 23 - Dart & Flutter on RISC-V
Fluttercon Berlin 23 - Dart & Flutter on RISC-V
 
Flutter SV Meetup Oct 2022 - End to end encrypted IoT with Dart and Flutter
Flutter SV Meetup Oct 2022 - End to end encrypted IoT with Dart and FlutterFlutter SV Meetup Oct 2022 - End to end encrypted IoT with Dart and Flutter
Flutter SV Meetup Oct 2022 - End to end encrypted IoT with Dart and Flutter
 
QConSF 2022 - Backends in Dart
QConSF 2022 - Backends in DartQConSF 2022 - Backends in Dart
QConSF 2022 - Backends in Dart
 
London IoT Meetup Sep 2022 - End to end encrypted IoT
London IoT Meetup Sep 2022 - End to end encrypted IoTLondon IoT Meetup Sep 2022 - End to end encrypted IoT
London IoT Meetup Sep 2022 - End to end encrypted IoT
 
Flutter Vikings 2022 - End to end IoT with Dart and Flutter
Flutter Vikings 2022 - End to end IoT with Dart and FlutterFlutter Vikings 2022 - End to end IoT with Dart and Flutter
Flutter Vikings 2022 - End to end IoT with Dart and Flutter
 
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
 
Devoxx UK 2022 - Application security: What should the attack landscape look ...
Devoxx UK 2022 - Application security: What should the attack landscape look ...Devoxx UK 2022 - Application security: What should the attack landscape look ...
Devoxx UK 2022 - Application security: What should the attack landscape look ...
 
Flutter Festival London 2022 - End to end IoT with Dart and Flutter
Flutter Festival London 2022 - End to end IoT with Dart and FlutterFlutter Festival London 2022 - End to end IoT with Dart and Flutter
Flutter Festival London 2022 - End to end IoT with Dart and Flutter
 
Full Stack Squared 2022 - Power of Open Source
Full Stack Squared 2022   - Power of Open SourceFull Stack Squared 2022   - Power of Open Source
Full Stack Squared 2022 - Power of Open Source
 
Flutter Vikings 2022 - Full Stack Dart
Flutter Vikings 2022  - Full Stack DartFlutter Vikings 2022  - Full Stack Dart
Flutter Vikings 2022 - Full Stack Dart
 
Droidcon London 2021 - Full Stack Dart
Droidcon London 2021   - Full Stack DartDroidcon London 2021   - Full Stack Dart
Droidcon London 2021 - Full Stack Dart
 
Keeping a project going
Keeping a project goingKeeping a project going
Keeping a project going
 
Dart on Arm - Flutter Bangalore June 2021
Dart on Arm - Flutter Bangalore June 2021Dart on Arm - Flutter Bangalore June 2021
Dart on Arm - Flutter Bangalore June 2021
 
TMS9995 on RC2014
TMS9995 on RC2014TMS9995 on RC2014
TMS9995 on RC2014
 
CloudCamp London Nov 2019 Intro
CloudCamp London Nov 2019 IntroCloudCamp London Nov 2019 Intro
CloudCamp London Nov 2019 Intro
 
DevSecOps Days London - Teaching 'Shift Left on Security'
DevSecOps Days London - Teaching 'Shift Left on Security'DevSecOps Days London - Teaching 'Shift Left on Security'
DevSecOps Days London - Teaching 'Shift Left on Security'
 
Cooking with a touch of science and a dash of engineering
Cooking with a touch of science and a dash of engineeringCooking with a touch of science and a dash of engineering
Cooking with a touch of science and a dash of engineering
 
Agile Enterprise Rome 2018 - Ops and Security in a PaaS and Serverless world
Agile Enterprise Rome 2018 - Ops and Security in a PaaS and Serverless worldAgile Enterprise Rome 2018 - Ops and Security in a PaaS and Serverless world
Agile Enterprise Rome 2018 - Ops and Security in a PaaS and Serverless world
 

Recently uploaded

Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024
Michael Price
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
Bhajan Mehta
 
The Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - CoatueThe Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - Coatue
Razin Mustafiz
 
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and ConsiderationsChoosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
webbyacad software
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
SAI KAILASH R
 
NVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space ExplorationNVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space Exploration
Alison B. Lowndes
 
kk vathada _digital transformation frameworks_2024.pdf
kk vathada _digital transformation frameworks_2024.pdfkk vathada _digital transformation frameworks_2024.pdf
kk vathada _digital transformation frameworks_2024.pdf
KIRAN KV
 
What's New in Teams Calling, Meetings, Devices June 2024
What's New in Teams Calling, Meetings, Devices June 2024What's New in Teams Calling, Meetings, Devices June 2024
What's New in Teams Calling, Meetings, Devices June 2024
Stephanie Beckett
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
BrainSell Technologies
 
Enterprise_Mobile_Security_Forum_2013.pdf
Enterprise_Mobile_Security_Forum_2013.pdfEnterprise_Mobile_Security_Forum_2013.pdf
Enterprise_Mobile_Security_Forum_2013.pdf
Yury Chemerkin
 
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
ankush9927
 
CheckPoint Firewall Presentation CCSA.pdf
CheckPoint Firewall Presentation CCSA.pdfCheckPoint Firewall Presentation CCSA.pdf
CheckPoint Firewall Presentation CCSA.pdf
ssuser137992
 
Top 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdfTop 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdf
Marrie Morris
 
UX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business GoalsUX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business Goals
FIDO Alliance
 
Camunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptxCamunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptx
ZachWylie3
 
Generative AI Reasoning Tech Talk - July 2024
Generative AI Reasoning Tech Talk - July 2024Generative AI Reasoning Tech Talk - July 2024
Generative AI Reasoning Tech Talk - July 2024
siddu769252
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
FIDO Alliance
 
Smart Mobility Market:Revolutionizing Transportation.pdf
Smart Mobility Market:Revolutionizing Transportation.pdfSmart Mobility Market:Revolutionizing Transportation.pdf
Smart Mobility Market:Revolutionizing Transportation.pdf
Market.us
 
The History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal EmbeddingsThe History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal Embeddings
Zilliz
 
Challenges and Strategies of Digital Transformation.pptx
Challenges and Strategies of Digital Transformation.pptxChallenges and Strategies of Digital Transformation.pptx
Challenges and Strategies of Digital Transformation.pptx
wisdomfishlee
 

Recently uploaded (20)

Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
 
The Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - CoatueThe Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - Coatue
 
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and ConsiderationsChoosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
 
NVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space ExplorationNVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space Exploration
 
kk vathada _digital transformation frameworks_2024.pdf
kk vathada _digital transformation frameworks_2024.pdfkk vathada _digital transformation frameworks_2024.pdf
kk vathada _digital transformation frameworks_2024.pdf
 
What's New in Teams Calling, Meetings, Devices June 2024
What's New in Teams Calling, Meetings, Devices June 2024What's New in Teams Calling, Meetings, Devices June 2024
What's New in Teams Calling, Meetings, Devices June 2024
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
 
Enterprise_Mobile_Security_Forum_2013.pdf
Enterprise_Mobile_Security_Forum_2013.pdfEnterprise_Mobile_Security_Forum_2013.pdf
Enterprise_Mobile_Security_Forum_2013.pdf
 
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
 
CheckPoint Firewall Presentation CCSA.pdf
CheckPoint Firewall Presentation CCSA.pdfCheckPoint Firewall Presentation CCSA.pdf
CheckPoint Firewall Presentation CCSA.pdf
 
Top 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdfTop 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdf
 
UX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business GoalsUX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business Goals
 
Camunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptxCamunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptx
 
Generative AI Reasoning Tech Talk - July 2024
Generative AI Reasoning Tech Talk - July 2024Generative AI Reasoning Tech Talk - July 2024
Generative AI Reasoning Tech Talk - July 2024
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
 
Smart Mobility Market:Revolutionizing Transportation.pdf
Smart Mobility Market:Revolutionizing Transportation.pdfSmart Mobility Market:Revolutionizing Transportation.pdf
Smart Mobility Market:Revolutionizing Transportation.pdf
 
The History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal EmbeddingsThe History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal Embeddings
 
Challenges and Strategies of Digital Transformation.pptx
Challenges and Strategies of Digital Transformation.pptxChallenges and Strategies of Digital Transformation.pptx
Challenges and Strategies of Digital Transformation.pptx
 

Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards for Dart and Flutter projects

  • 1. © 2024 - Atsign | docs.atsign.com Showing that you care about security - OpenSSF Scorecards for Dart and Flutter projects Fluttercon - Jun 2024
  • 2. © 2024 - Atsign | docs.atsign.com
  • 3. © 2024 - Atsign | docs.atsign.com
  • 4. © 2024 - Atsign | docs.atsign.com Hi, I’m Chris @cpswan https://chris.swanz.net
  • 5. © 2024 - Atsign | docs.atsign.com Agenda ➔ The Dart and Flutter inspiration ➔ Who are OpenSSF, and what is a scorecard? ➔ Start with Allstar ➔ Doing your first repository ➔ Scaling across multiple repositories ➔ 80:20 ➔ The toil of it all
  • 6. The Dart and Flutter inspiration
  • 7. © 2024 - Atsign | docs.atsign.com https://opensource.googleblog.com/2022/06/Dart-and-Flutter-enable-Allstar-and-Security-Scorecards.html
  • 8. © 2024 - Atsign | docs.atsign.com https://github.com/flutter/flutter
  • 9. Who are OpenSSF, and what is a scorecard?
  • 10. © 2024 - Atsign | docs.atsign.com https://openssf.org/
  • 11. © 2024 - Atsign | docs.atsign.com
  • 13. © 2024 - Atsign | docs.atsign.com https://github.com/ossf/allstar
  • 14. A whole bunch of config, and a whole bunch of files
  • 15. Doing your first repository
  • 16. Expect LOTS of issues
  • 17. Help is at hand
  • 19. Scaling across multiple repositories
  • 20. Rinse and repeat - more of this
  • 21. And more of this
  • 22. 80:20
  • 23. It’s relatively easy to get most stuff right
  • 24. There will be a residue
  • 25. How this looks to your users
  • 27. Static analysis with osv-scanner steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 # v1.6.4 with: sdk: stable - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: 'stable' cache-dependency-path: tools/osv-scanner/go.sum - name: Run osv-scanner working-directory: packages/${{ matrix.package }} run: | dart pub get go install github.com/google/osv-scanner/cmd/osv-scanner@6316373e47d... osv-scanner --lockfile=./pubspec.lock
  • 28. This is where it gets really gnarly
  • 29. The questionnaire is long and detailed
  • 30. And some sections might be hard to accomplish
  • 31. The toil of it all
  • 32. Make friends with the new boss
  • 33. From a docs repo (no actual code to maintain)
  • 34. From a code repo
  • 35. Scorecard’s own dependencies can change with annoying regularity (in every repo with a scorecard)
  • 36. Base dependencies can be amplified
  • 37. Use the directories capability, and groups - package-ecosystem: "pub" directories: - "/packages/dart/sshnoports/" - "/packages/dart/sshnp_flutter/" schedule: interval: "daily" groups: pub: patterns: - "*"
  • 38. It might still help to do rollups: rollup.sh #!/bin/bash if [ $# -ne 2 ] ; then echo "Usage rollup.sh <BASE_PR> <LAST_PR>" exit 1 fi BASE_PR=$1 LAST_PR=$2 git pull gh pr checkout "$BASE_PR" for (( i=(($BASE_PR + 1)); i<=$LAST_PR; i++ )) do PR_BRANCH=$(gh pr view "$i" --json headRefName -q .headRefName) git merge origin/"$PR_BRANCH" -m "build(deps): Rollup merge branch for #${i} ${PR_BRANCH}" done git push
  • 40. Generating Software Bill of Materials (SBOM) - name: Checkout pubspec.lock uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 with: sparse-checkout: packages/dart/sshnoports/pubspec.lock sparse-checkout-cone-mode: false - name: Install Syft uses: anchore/sbom-action/download-syft@7ccf588e3cf3cc2611714c2eeae48550fbc17552 - name: Generate SBOMs run: | syft scan file:./packages/dart/sshnoports/pubspec.lock -o 'spdx-json=tarballs/dart_sshnoports_sbom.spdx.json' -o 'cyclonedx-json=tarballs/dart_sshnoports_sbom.cyclonedx.json'
  • 41. Make the SBOM with Syft, understand it with GUAC https://github.com/anchore/syft https://guac.sh/
  • 42. Generate hashes and build attestation - name: Generate SHA256 checksums working-directory: tarballs run: sha256sum * > checksums.txt - id: hash name: Pass artifact hashes for SLSA provenance working-directory: tarballs run: | echo "hashes=$(cat checksums.txt | base64 -w0)" >> "$GITHUB_OUTPUT" - uses: actions/attest-build-provenance@f8d5ea8082b0d9f5… # v1.1.0 with: subject-path: 'tarballs/**'
  • 43. In the GitHub Actions run for a build:
  • 44. Clicking through to an attestation
  • 45. Generate hashes and build attestation: Supply-chain Levels for Software Artifacts (SLSA) provenance: needs: [github-release] permissions: actions: read # Needed for detection of GitHub Actions environment. id-token: write # Needed for provenance signing and ID contents: write # Needed for release uploads uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0 with: base64-subjects: "${{ needs.github-release.outputs.hashes }}" upload-assets: true
  • 46. Peeking inside SLSA attestation: multiple.intoto.jsonl { "_type": "https://in-toto.io/Statement/v0.1", "predicateType": "https://slsa.dev/provenance/v0.2", "subject": [ { "name": "dart_sshnoports_sbom.cyclonedx.json", "digest": { "sha256": "017532bc7a01a0249211819be5858bc76cf4db7824e0e6432dd0831983948094" } }, { "name": "dart_sshnoports_sbom.spdx.json", "digest": { "sha256": "013bff32cd7c776e54c36db692aceadce13d28839c06ec1b8ed23421edf305e1" } },
  • 47. The software supply chain trifecta
  • 48. © 2024 - Atsign | docs.atsign.com Review ➔ Our journey started with adoption by the Dart/Flutter team. ➔ An OpenSSF Scorecard can show you care about security. ➔ Allstar provides a good starting point. ➔ Pick a first repo to get a hang of what’s needed. ➔ Then automate across the rest of the organisation. ➔ 20% of the effort to get 80% of the score. Uphill from there. ➔ Scorecards do create ongoing toil that needs to be minimised.
  • 49. © 2024 - Atsign | docs.atsign.com Call to action: Run the scorecard CLI against one of your own repos https://github.com/ossf/scorecard# scorecard-command-line-interface
  • 51. Thanks for your time chris@atsign.com @cpswan