From 925bf4c2db1f7d6a2c874af3efdd574c06eb6474 Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Wed, 4 Feb 2026 14:15:42 +0300 Subject: [PATCH 01/13] docs: add commit signing summary --- labs/submission1.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 labs/submission1.md diff --git a/labs/submission1.md b/labs/submission1.md new file mode 100644 index 00000000..be5e6e54 --- /dev/null +++ b/labs/submission1.md @@ -0,0 +1,7 @@ +# Lab 1 Submission + +## Task 1 — SSH Commit Signature Verification +TODO + +## Task 2 — PR Template & Checklist +TODO From 1e8bd54a7007501776c5114d4accc473f5e11f37 Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Wed, 4 Feb 2026 16:22:56 +0300 Subject: [PATCH 02/13] docs: add task 1 submission --- labs/submission1.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/labs/submission1.md b/labs/submission1.md index be5e6e54..fcf3d843 100644 --- a/labs/submission1.md +++ b/labs/submission1.md @@ -1,7 +1,20 @@ # Lab 1 Submission ## Task 1 — SSH Commit Signature Verification -TODO -## Task 2 — PR Template & Checklist -TODO +### Why signed commits are important +Signed commits help verify the authenticity and integrity of changes in a repository. +They ensure that a commit was created by a trusted developer and was not modified +after being signed. This protects projects from impersonation, supply-chain attacks, +and unauthorized changes. + +### Why commit signing is important in DevOps workflows +In DevOps workflows, many changes are automated and go through CI/CD pipelines. +Commit signing provides traceability and trust, ensuring that only verified contributors +can introduce changes into production systems. This is especially important for +infrastructure-as-code and security-sensitive repositories. + +### Evidence of SSH commit signing +- SSH key configured for commit signing +- Signed commit pushed to GitHub +- Commit shows **Verified** badge on GitHub From 823cf787280ae996e214d2ccd316e4ac24c51b45 Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Wed, 4 Feb 2026 16:26:13 +0300 Subject: [PATCH 03/13] docs: add pull request template --- .github/pull_request_template.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..283f8f7a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ +## Goal +Describe the purpose of this pull request. + +## Changes +List the main changes introduced. + +## Testing +Describe how the changes were tested. + +## Checklist +- [ ] Goal is clearly described +- [ ] Changes are documented +- [ ] Testing steps are provided From 57803e7b513f89e0b5fb618eaa64e72970c9d7da Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Mon, 9 Feb 2026 09:26:25 +0300 Subject: [PATCH 04/13] Add test file --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 00000000..2eec599a --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +Test content From 25b3bb81f56f1991c8bca46e8a194e0c3b52e68e Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Mon, 9 Feb 2026 09:40:00 +0300 Subject: [PATCH 05/13] docs: add lab2 submission --- labs/submission2.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 labs/submission2.md diff --git a/labs/submission2.md b/labs/submission2.md new file mode 100644 index 00000000..affa982a --- /dev/null +++ b/labs/submission2.md @@ -0,0 +1,7 @@ +# Lab 2 Submission + +## Task 1 — Git Object Model Exploration (2 pts) + +### Commands & Outputs + +#### Create sample commit From 3ab6647eb083b89f74f763fed2c02d1b07fa688d Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Mon, 9 Feb 2026 10:14:58 +0300 Subject: [PATCH 06/13] docs: complete lab2 submission --- labs/submission2.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/labs/submission2.md b/labs/submission2.md index affa982a..af3fe055 100644 --- a/labs/submission2.md +++ b/labs/submission2.md @@ -5,3 +5,40 @@ ### Commands & Outputs #### Create sample commit +```bash +echo "Test content" > test.txt +git add test.txt +git commit -m "Add test file" +git log --oneline -1 +#### Inspect blob object (test.txt) +```bash +git cat-file -p 2eec599a1130d2ff231309bb776d1989b97c6ab2 +### What each object type represents + +- **Blob**: Stores the raw contents of a file, without filename or directory information. +- **Tree**: Represents a directory by mapping names to blob or subtree hashes. +- **Commit**: Stores a snapshot reference (tree), metadata, and links commits into history. +### Analysis + +Git stores data as content-addressed objects. File contents are stored as blobs, directories as trees, and commits reference trees and parent commits. This structure ensures integrity, deduplication, and efficient history tracking. +## Task 2 — Reset and Reflog Recovery (2 pts) + +### Commits created for practice +- First commit +- Second commit +- Third commit + +### Reset behavior + +- **git reset --soft HEAD~1** + Removes the last commit from history, but keeps changes staged in the index. + +- **git reset --mixed HEAD~1** + Removes the last commit from history and keeps changes unstaged in the working directory. + +- **git reset --hard HEAD~1** + Completely removes the last commit and discards all related changes. + +### Recovery using reflog + +Using `git reflog`, the removed commit was found and successfully restored with `git reset --hard `. From 87031785a3983a582139bcf32b0b5deea0f60f33 Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Mon, 9 Feb 2026 11:39:30 +0300 Subject: [PATCH 07/13] docs: complete lab2 submission --- labs/submission2.md | 245 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 222 insertions(+), 23 deletions(-) diff --git a/labs/submission2.md b/labs/submission2.md index af3fe055..558b4fa4 100644 --- a/labs/submission2.md +++ b/labs/submission2.md @@ -5,40 +5,239 @@ ### Commands & Outputs #### Create sample commit -```bash -echo "Test content" > test.txt -git add test.txt -git commit -m "Add test file" -git log --oneline -1 +echo "Test content" > test.txt +git add test.txt +git commit -m "Add test file" +git log --oneline -1 + +Output: +3ab6647 (HEAD -> feature/lab2, origin/feature/lab2) docs: complete lab2 submission + +#### Inspect commit object (HEAD) +git cat-file -p HEAD + +Output: +tree 7066bcf8bd9ce72d49adaf28a32f459fc4c46255 +parent 25b3bb81f56f1991c8bca46e8a194e0c3b52e68e +author Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> 1770621298 +0300 +committer Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> 1770621298 +0300 + +docs: complete lab2 submission + +#### Inspect tree object +git cat-file -p 7066bcf8bd9ce72d49adaf28a32f459fc4c46255 + +Output: +040000 tree 27f499e9865b4c58dedf40cf848d8373dd67a8a4 .github +100644 blob 6e60bebec0724892a7c82c52183d0a7b467cb6bb README.md +040000 tree a1061247fd38ef2a568735939f86af7b1000f83c app +040000 tree e7a09b7737f29ffde746b1e363af98e55f0027c4 labs +040000 tree d3fb3722b7a867a83efde73c57c49b5ab3e62c63 lectures +100644 blob 2eec599a1130d2ff231309bb776d1989b97c6ab2 test.txt + #### Inspect blob object (test.txt) -```bash -git cat-file -p 2eec599a1130d2ff231309bb776d1989b97c6ab2 +git cat-file -p 2eec599a1130d2ff231309bb776d1989b97c6ab2 + +Output: +Test content + ### What each object type represents +Blob: Stores the raw contents of a file without filename or directory information. +Tree: Represents a directory by mapping file names to blob or subtree hashes. +Commit: Stores metadata and a reference to a tree snapshot, linking it into history. -- **Blob**: Stores the raw contents of a file, without filename or directory information. -- **Tree**: Represents a directory by mapping names to blob or subtree hashes. -- **Commit**: Stores a snapshot reference (tree), metadata, and links commits into history. ### Analysis +Git stores repository data as content-addressed objects. File contents are saved as blobs, directories as trees, and commits reference trees and parent commits. This design ensures data integrity, automatic deduplication, and efficient version history management. -Git stores data as content-addressed objects. File contents are stored as blobs, directories as trees, and commits reference trees and parent commits. This structure ensures integrity, deduplication, and efficient history tracking. ## Task 2 — Reset and Reflog Recovery (2 pts) -### Commits created for practice -- First commit -- Second commit +### The exact commands I ran and why +1) Create/switch to practice branch to safely test destructive commands: +git switch git-reset-practice + +2) Create 3 commits to have a history to rewind: +echo "First commit" > file.txt +git add file.txt +git commit -m "First commit" + +echo "Second commit" >> file.txt +git add file.txt +git commit -m "Second commit" + +echo "Third commit" >> file.txt +git add file.txt +git commit -m "Third commit" + +3) Inspect history and working tree before reset: +git log --oneline --decorate -3 +git status + +4) Test reset --soft (remove last commit from history, keep changes staged): +git reset --soft HEAD~1 +git log --oneline --decorate -3 +git status + +5) Test reset --hard (remove last commit and discard changes): +git reset --hard HEAD~1 +git log --oneline --decorate -3 +git status + +6) Use reflog to find lost commits and recover: +git reflog -10 +git reset --hard d8cab3c + +### Snippets of git log --oneline and git reflog + +Before reset: +git log --oneline --decorate -3 +d8cab3c (HEAD -> git-reset-practice) Third commit +bb5c142 Second commit +90a7b35 First commit + +After reset --soft HEAD~1: +git log --oneline --decorate -3 +bb5c142 (HEAD -> git-reset-practice) Second commit +90a7b35 First commit +25b3bb8 docs: add lab2 submission + +git status +Changes to be committed: +modified: file.txt + +After reset --hard HEAD~1: +HEAD is now at 90a7b35 First commit +git log --oneline --decorate -3 +90a7b35 (HEAD -> git-reset-practice) First commit +25b3bb8 docs: add lab2 submission +57803e7 Add test file + +git status +nothing to commit, working tree clean + +Reflog snippet (last 10): +git reflog -10 +90a7b35 (HEAD -> git-reset-practice) HEAD@{0}: reset: moving to HEAD~1 +bb5c142 HEAD@{1}: reset: moving to HEAD~1 +d8cab3c HEAD@{2}: checkout: moving from feature/lab2 to git-reset-practice +... + +Recovery: +git reset --hard d8cab3c +HEAD is now at d8cab3c Third commit + +### What changed in working tree, index, and history for each reset +- reset --soft HEAD~1: +History: HEAD moved back one commit (Third commit removed from branch history). +Index (staging): changes from the removed commit stayed staged (git status showed “Changes to be committed: modified file.txt”). +Working tree: matched index (no unstaged changes). + +- reset --hard HEAD~1: +History: HEAD moved back one more commit (Second commit removed as well). +Index + working tree: both were reset to match the target commit; changes from removed commits were discarded (git status clean). + +### Analysis of recovery process using reflog +Even after hard resets, Git recorded the previous HEAD positions in reflog. By finding the commit hash d8cab3c in reflog and running git reset --hard d8cab3c, the branch pointer was moved back to the lost commit, restoring the previous state. + +## Task 3 — Visualize Commit History (2 pts) + +### Commands & Output (graph) +Command: +git log --oneline --graph --all + +Output snippet: +* 057f934 (refs/stash) On feature/lab2: wip: submission2 +|\ +| * dd6da5f index on feature/lab2: 5b134a3 Third commit +|/ +* 5b134a3 (feature/lab2) Third commit +* 3172981 Second commit +* 8d90cba First commit +* 3ab6647 (origin/feature/lab2) docs: complete lab2 submission +| * d8cab3c (HEAD -> git-reset-practice) Third commit +| * bb5c142 Second commit +| * 90a7b35 First commit +|/ +* 25b3bb8 docs: add lab2 submission +* 57803e7 Add test file + +### Commit messages list +- On feature/lab2: wip: submission2 +- index on feature/lab2: 5b134a3 Third commit - Third commit +- Second commit +- First commit +- docs: complete lab2 submission +- docs: add lab2 submission +- Add test file + +### Reflection +The graph shows where branches diverge and merge, and how HEAD and branch pointers relate to the same underlying commits. Using --all helps verify that commits are not “lost” (e.g., stash and practice-branch commits are visible in the full history). + + +## Task 4 — Tagging Commits (1 pt) + +### Tag names and commands used +git show -s --oneline 3ab6647 +git tag -a v2.0 -m "Lab2 submission" 3ab6647 +git show -s --oneline v2.0 +git rev-parse v2.0 +git push origin v2.0 + +### Associated commit hashes +Tagged commit: +3ab6647 docs: complete lab2 submission + +Annotated tag object hash: +b5310d4fd678a58f27eaf70a21818161b5cbcf1c + +### Why tags matter +Tags provide stable human-readable names for specific commits (versions/releases). They are commonly used for versioning, CI/CD release triggers, and for generating release notes tied to an exact snapshot. + + + +## Task 5 — git switch vs git checkout vs git restore (2 pts) + +### Commands and outputs + +Current branch: +git branch --show-current +git-reset-practice + +Create and switch to a new branch (switch): +git switch -c switch-test +Switched to a new branch 'switch-test' +git branch --show-current +switch-test + +Switch branches using checkout (legacy): +git checkout git-reset-practice +Switched to branch 'git-reset-practice' +git branch --show-current +git-reset-practice + +Modify a file and check status: +echo "temp line" >> file.txt +git status +Changes not staged for commit: +modified: file.txt +modified: labs/submission2.md + +Discard working tree changes for a file (restore): +git restore file.txt +git status +Changes not staged for commit: +modified: labs/submission2.md -### Reset behavior +### git status / git branch outputs showing state changes +- git branch --show-current showed branch changes: git-reset-practice -> switch-test -> git-reset-practice. +- git status showed file.txt as modified after editing, and after git restore file.txt the modification disappeared. -- **git reset --soft HEAD~1** - Removes the last commit from history, but keeps changes staged in the index. +### When to use each +Use git switch to move between branches and create new branches (branch-focused, simpler). Use git checkout mainly for older workflows or when switching both branches and detached commits in one command. Use git restore to discard changes in the working tree or unstage files without switching branches. -- **git reset --mixed HEAD~1** - Removes the last commit from history and keeps changes unstaged in the working directory. +## Task 6 — GitHub Community Engagement (1 pt) -- **git reset --hard HEAD~1** - Completely removes the last commit and discards all related changes. +### GitHub Community +Starring a repository is a lightweight way to bookmark useful projects and signal appreciation to maintainers. Following users helps you keep track of their activity (new repos, contributions) and discover related work through their updates. -### Recovery using reflog -Using `git reflog`, the removed commit was found and successfully restored with `git reset --hard `. From c0a714dc094c1f591718ef4b20f1d98240d6f962 Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Sun, 15 Feb 2026 17:46:45 +0300 Subject: [PATCH 08/13] ci: add GitHub Actions workflow for lab3 --- .github/workflows/lab3.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/lab3.yml diff --git a/.github/workflows/lab3.yml b/.github/workflows/lab3.yml new file mode 100644 index 00000000..dc049c8a --- /dev/null +++ b/.github/workflows/lab3.yml @@ -0,0 +1,17 @@ +name: Lab3 - GitHub Actions + +on: + push: + workflow_dispatch: + +jobs: + info: + runs-on: ubuntu-latest + steps: + - name: Print basic info + run: | + echo "event: ${{ github.event_name }}" + echo "repo: ${{ github.repository }}" + echo "ref: ${{ github.ref }}" + echo "sha: ${{ github.sha }}" + echo "actor: ${{ github.actor }}" From 46e63aa1a7d4aaee5e94cc1cd7298f6a70eb38fc Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Sun, 15 Feb 2026 17:56:52 +0300 Subject: [PATCH 09/13] ci: collect runner system information --- .github/workflows/lab3.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/lab3.yml b/.github/workflows/lab3.yml index dc049c8a..89f472e6 100644 --- a/.github/workflows/lab3.yml +++ b/.github/workflows/lab3.yml @@ -15,3 +15,21 @@ jobs: echo "ref: ${{ github.ref }}" echo "sha: ${{ github.sha }}" echo "actor: ${{ github.actor }}" + - name: Gather runner system info + run: | + echo "uname:" + uname -a + echo "" + echo "os release:" + cat /etc/os-release || true + echo "" + echo "cpu:" + nproc + lscpu || true + echo "" + echo "memory:" + free -h || true + echo "" + echo "disk:" + df -h + From 801cf800a9192ef5a5bbb19ab7ca12cb1807ea45 Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Sun, 15 Feb 2026 19:19:05 +0300 Subject: [PATCH 10/13] docs: add lab3 submission --- labs/submission3.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 labs/submission3.md diff --git a/labs/submission3.md b/labs/submission3.md new file mode 100644 index 00000000..805ffc4c --- /dev/null +++ b/labs/submission3.md @@ -0,0 +1,30 @@ +# Lab 3 — GitHub Actions + +## Task 1 — First GitHub Actions Workflow + +### Link to successful run (or screenshots) +- Push run: + +### Key concepts learned (jobs, steps, runners, triggers) +- **Workflow**: YAML-файл в `.github/workflows/`, который описывает автоматизацию. +- **Trigger (event)**: событие, запускающее workflow (в этой лабе `push` и `workflow_dispatch`). +- **Job**: набор шагов, выполняемых на одном runner (`jobs.info`). +- **Steps**: последовательные команды внутри job (выполнение `run`). +- **Runner**: машина, где выполняется job (в этой лабе `ubuntu-latest`, GitHub-hosted runner). + +### What caused the run to trigger +- Запуск произошёл из-за события **push** в репозиторий (коммит(ы) в ветку `feature/lab3`). + +### Analysis of workflow execution process +- GitHub получил событие `push`, сопоставил его с `on: push` в workflow. +- Создал job `info` и выделил runner `ubuntu-latest`. +- Runner выполнил шаги по порядку: сначала печать контекста GitHub (`github.*`), затем сбор данных о системе. + +## Task 2 — Manual Trigger + System Information + +### Changes made to the workflow file +- Добавлен ручной триггер `workflow_dispatch`. +- Добавлен шаг `Gather runner system info` для вывода OS/CPU/RAM/Disk информации. + +### Gathered system information from runner +- Paste relevant output from logs (uname/os/cpu/mem/disk): From 3fba6397602c1d171887436d2ed7603e2f502f18 Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Sun, 15 Feb 2026 20:54:03 +0300 Subject: [PATCH 11/13] docs: add runner system info output --- labs/submission3.md | 106 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 93 insertions(+), 13 deletions(-) diff --git a/labs/submission3.md b/labs/submission3.md index 805ffc4c..18226287 100644 --- a/labs/submission3.md +++ b/labs/submission3.md @@ -3,28 +3,108 @@ ## Task 1 — First GitHub Actions Workflow ### Link to successful run (or screenshots) -- Push run: +- Push run: https://github.com/StrVlad/DevOps-Intro/actions/runs/22038987987 +-Manual run: https://github.com/StrVlad/DevOps-Intro/actions/runs/22039928148 ### Key concepts learned (jobs, steps, runners, triggers) -- **Workflow**: YAML-файл в `.github/workflows/`, который описывает автоматизацию. -- **Trigger (event)**: событие, запускающее workflow (в этой лабе `push` и `workflow_dispatch`). -- **Job**: набор шагов, выполняемых на одном runner (`jobs.info`). -- **Steps**: последовательные команды внутри job (выполнение `run`). -- **Runner**: машина, где выполняется job (в этой лабе `ubuntu-latest`, GitHub-hosted runner). +- **Workflow**: A YAML file in `.github/workflows/` that describes the automation. +- **Trigger (event)**: An event that starts a workflow (in this lab: `push` and `workflow_dispatch`). +- **Job**: A set of steps executed on a single runner (`jobs.info`). +- **Steps**: A sequence of commands within a job (executed via `run`). +- **Runner**: The machine where the job runs (in this lab: `ubuntu-latest`, a GitHub-hosted runner). ### What caused the run to trigger -- Запуск произошёл из-за события **push** в репозиторий (коммит(ы) в ветку `feature/lab3`). +- The run was triggered by a **push** event to the repository (commit(s) to the `feature/lab3` branch). ### Analysis of workflow execution process -- GitHub получил событие `push`, сопоставил его с `on: push` в workflow. -- Создал job `info` и выделил runner `ubuntu-latest`. -- Runner выполнил шаги по порядку: сначала печать контекста GitHub (`github.*`), затем сбор данных о системе. +- GitHub received the `push` event and matched it against `on: push` in the workflow. +- It created the `info` job and assigned an `ubuntu-latest` runner. +- The runner executed the steps in order: first printing the GitHub context (`github.*`), then collecting system information. ## Task 2 — Manual Trigger + System Information ### Changes made to the workflow file -- Добавлен ручной триггер `workflow_dispatch`. -- Добавлен шаг `Gather runner system info` для вывода OS/CPU/RAM/Disk информации. +- Added a manual trigger: `workflow_dispatch`. +- Added a step `Gather runner system info` to output OS/CPU/RAM/Disk information. + ### Gathered system information from runner -- Paste relevant output from logs (uname/os/cpu/mem/disk): +uname: +Linux runnervmjduv7 6.14.0-1017-azure #17~24.04.1-Ubuntu SMP Mon Dec 1 20:10:50 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux + +os release: +PRETTY_NAME="Ubuntu 24.04.3 LTS" +NAME="Ubuntu" +VERSION_ID="24.04" +VERSION="24.04.3 LTS (Noble Numbat)" +VERSION_CODENAME=noble +ID=ubuntu +ID_LIKE=debian +HOME_URL="https://www.ubuntu.com/" +SUPPORT_URL="https://help.ubuntu.com/" +BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" +PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" +UBUNTU_CODENAME=noble +LOGO=ubuntu-logo + +cpu: +4 +Architecture: x86_64 +CPU op-mode(s): 32-bit, 64-bit +Address sizes: 48 bits physical, 48 bits virtual +Byte Order: Little Endian +CPU(s): 4 +On-line CPU(s) list: 0-3 +Vendor ID: AuthenticAMD +Model name: AMD EPYC 7763 64-Core Processor +CPU family: 25 +Model: 1 +Thread(s) per core: 2 +Core(s) per socket: 2 +Socket(s): 1 +Stepping: 1 +BogoMIPS: 4890.85 +Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves user_shstk clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm +Virtualization: AMD-V +Hypervisor vendor: Microsoft +Virtualization type: full +L1d cache: 64 KiB (2 instances) +L1i cache: 64 KiB (2 instances) +L2 cache: 1 MiB (2 instances) +L3 cache: 32 MiB (1 instance) +NUMA node(s): 1 +NUMA node0 CPU(s): 0-3 +Vulnerability Gather data sampling: Not affected +Vulnerability Ghostwrite: Not affected +Vulnerability Indirect target selection: Not affected +Vulnerability Itlb multihit: Not affected +Vulnerability L1tf: Not affected +Vulnerability Mds: Not affected +Vulnerability Meltdown: Not affected +Vulnerability Mmio stale data: Not affected +Vulnerability Reg file data sampling: Not affected +Vulnerability Retbleed: Not affected +Vulnerability Spec rstack overflow: Vulnerable: Safe RET, no microcode +Vulnerability Spec store bypass: Vulnerable +Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization +Vulnerability Spectre v2: Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected +Vulnerability Srbds: Not affected +Vulnerability Tsa: Vulnerable: Clear CPU buffers attempted, no microcode +Vulnerability Tsx async abort: Not affected +Vulnerability Vmscape: Not affected + +memory: + total used free shared buff/cache available +Mem: 15Gi 782Mi 13Gi 35Mi 1.8Gi 14Gi +Swap: 3.0Gi 0B 3.0Gi + +disk: +Filesystem Size Used Avail Use% Mounted on +/dev/root 145G 53G 92G 37% / +tmpfs 7.9G 84K 7.9G 1% /dev/shm +tmpfs 3.2G 1000K 3.2G 1% /run +tmpfs 5.0M 0 5.0M 0% /run/lock +efivarfs 128M 26K 128M 1% /sys/firmware/efi/efivars +/dev/sda16 881M 63M 757M 8% /boot +/dev/sda15 105M 6.2M 99M 6% /boot/efi +tmpfs 1.6G 12K 1.6G 1% /run/user/1001 From a72f25c4729f8aae0c9c9774f9c1041178904baa Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Fri, 27 Feb 2026 07:08:44 +0300 Subject: [PATCH 12/13] docs: add lab4 submission --- labs/submission4.md | 240 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 labs/submission4.md diff --git a/labs/submission4.md b/labs/submission4.md new file mode 100644 index 00000000..4b1101c3 --- /dev/null +++ b/labs/submission4.md @@ -0,0 +1,240 @@ +## 1.1 Boot Performance Analysis + +### systemd-analyze +Startup finished in 1.718s (userspace) +graphical.target reached after 1.687s in userspace. + +### systemd-analyze blame +823ms landscape-client.service +415ms snapd.seeded.service +399ms dev-sdd.device +306ms snapd.service +244ms wsl-pro.service +198ms logrotate.service +177ms systemd-udev-trigger.service +175ms user@0.service +159ms systemd-resolved.service +89ms rsyslog.service +72ms systemd-journald.service +68ms keyboard-setup.service +65ms systemd-journal-flush.service +63ms systemd-logind.service +55ms systemd-udevd.service +51ms systemd-timesyncd.service +48ms dpkg-db-backup.service +41ms e2scrub_reap.service +... + +### Key observations +Boot to graphical.target ~1.7s. Top contributors: landscape-client.service and snapd-related services. + +## 1.2 System Load + +### uptime +06:12:21 up 1:11, 1 user, load average: 0.00, 0.00, 0.00 +### w +06:12:25 up 1:11, 1 user, load average: 0.00, 0.00, 0.00 +USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT +root pts/1 - 05:00 1:11m 0.02s 0.02s -bash + +### Key observations +System load and active sessions observed at time of analysis. + +## 1.3 Process Forensics + +### Top memory-consuming processes + PID PPID CMD %MEM %CPU + 222 1 /usr/bin/python3 /usr/share 0.2 0.0 + 155 1 /usr/lib/systemd/systemd-re 0.1 0.0 + 192 1 /usr/libexec/wsl-pro-servic 0.1 0.0 + 1 0 /sbin/init 0.1 0.0 + 52 1 /usr/lib/systemd/systemd-jo 0.1 0.0 + +### Top CPU-consuming processes + PID PPID CMD %MEM %CPU + 595 322 ps -eo pid,ppid,cmd,%mem,%c 0.0 100 + 1 0 /sbin/init 0.1 0.0 + 100 1 /usr/lib/systemd/systemd-ud 0.0 0.0 + 52 1 /usr/lib/systemd/systemd-jo 0.1 0.0 + 192 1 /usr/libexec/wsl-pro-servic 0.1 0.0 + +Top memory-consuming process: 222 1 /usr/bin/python3 /usr/share 0.2 0.0 + +### Key observations +Top memory and CPU processes identified at analysis time. + +## 1.4 Service Dependencies + +### systemctl list-dependencies +default.target +● ├─display-manager.service +● ├─systemd-update-utmp-runlevel.service +● ├─wslg.service +● └─multi-user.target +● ├─apport.service +● ├─console-setup.service +● ├─cron.service +● ├─dbus.service +● ├─dmesg.service +● ├─e2scrub_reap.service +● ├─landscape-client.service +● ├─networkd-dispatcher.service +● ├─rsyslog.service +● ├─snapd.apparmor.service +● ├─snapd.autoimport.service +● ├─snapd.core-fixup.service +● ├─snapd.seeded.service +● ├─snapd.service +● ├─systemd-logind.service +● ├─systemd-user-sessions.service +● ├─unattended-upgrades.service +● ├─wsl-pro.service +● └─basic.target +● ├─paths.target +● ├─slices.target +● ├─sockets.target +● └─sysinit.target + +### systemctl list-dependencies multi-user.target +multi-user.target +● ├─apport.service +● ├─console-setup.service +● ├─cron.service +● ├─dbus.service +● ├─landscape-client.service +● ├─networkd-dispatcher.service +● ├─rsyslog.service +● ├─snapd.service +● ├─systemd-logind.service +● ├─systemd-user-sessions.service +● ├─unattended-upgrades.service +● ├─wsl-pro.service +● └─basic.target + +### Key observations +System uses a standard systemd dependency hierarchy. +multi-user.target aggregates core services such as cron, dbus, logging, and snapd. +WSL-specific services (wslg, wsl-pro) appear as part of the boot chain. + +## 1.5 User Sessions + +### who -a +system boot 2026-02-27 05:00 +run-level 5 2026-02-27 05:00 +LOGIN console 2026-02-27 05:00 196 id=cons +LOGIN tty1 2026-02-27 05:00 210 id=tty1 +root pts/1 2026-02-27 05:00 (active session) + +### last -n 5 +reboot system boot 6.6.87.2-microsoft Fri Feb 27 05:00 still running +reboot system boot 6.6.87.2-microsoft Wed Dec 10 12:02 still running +reboot system boot 6.6.87.2-microsoft Sat Nov 15 00:13 still running +reboot system boot 6.6.87.2-microsoft Wed Sep 24 02:31 still running +reboot system boot 6.6.87.2-microsoft Thu Sep 18 17:40 still running + +### Key observations +System currently running since Feb 27 05:00. +Single active root session via pts. +Multiple previous reboots recorded (WSL kernel). + +## 1.6 Memory Analysis + +### free -h + total used free shared buff/cache available +Mem: 7.7Gi 495Mi 7.2Gi 3.5Mi 159Mi 7.2Gi +Swap: 2.0Gi 0B 2.0Gi + +### /proc/meminfo (filtered) +MemTotal: 8056016 kB +MemAvailable: 7548860 kB +SwapTotal: 2097152 kB + +### Key observations +System has ~7.7 GiB RAM with very low usage (~495 MiB). +Most memory is available; no swap is currently used. + +## 2.1 Network Path Tracing + +### traceroute github.com +traceroute to github.com (140.82.121.4), 30 hops max, 60 byte packets + 1 DESKTOP-BNQOR3 (172.28.96.1) 1.644 ms 1.576 ms 1.526 ms + 2 * * * + 3 * * * + 4 * * * + ... +30 * * * + +### Key observations +First hop is the WSL virtual gateway (172.28.96.1). +All subsequent hops do not respond (likely ICMP blocked by upstream network or firewall). +Target IP resolved successfully to 140.82.121.4. + +## 2.2 DNS Resolution Check + +### dig github.com +;; ->>HEADER<<- opcode: QUERY, status: NOERROR +;; flags: qr rd ad; QUERY: 1, ANSWER: 1 +;; WARNING: recursion requested but not available + +;; QUESTION SECTION: +;github.com. IN A + +;; ANSWER SECTION: +github.com. 0 IN A 140.82.121.4 + +Query time: 173 msec +SERVER: 172.28.96.1#53 (WSL internal DNS) +MSG SIZE rcvd: 54 + +### Key observations +DNS resolution successful. +github.com resolved to 140.82.121.4. +Query handled by WSL internal DNS resolver (172.28.96.1). + +## 2.3 Packet Capture (DNS) + +### tcpdump output +07:02:25.924924 eth0 Out IP 172.28.102.220.56434 > 172.28.96.1.53: 13348+ A? google.com. (51) +07:02:25.976466 eth0 In IP 172.28.96.1.53 > 172.28.102.220.56434: 13348 1/0/0 A 142.251.38.78 (54) + +2 packets captured + +### One example DNS query (sanitized explanation) +Client (172.28.102.220) queried DNS server (172.28.96.1) for A record of google.com. +DNS server responded with IP address 142.251.38.78. + +### Key observations +DNS request sent from WSL instance to internal resolver. +Standard UDP port 53 traffic observed. +Query-response pattern clearly visible (A record lookup). + +## 2.4 Reverse DNS (PTR Lookup) + +### dig -x 8.8.4.4 +;; status: NOERROR + +;; QUESTION SECTION: +;4.4.8.8.in-addr.arpa. IN PTR + +;; ANSWER SECTION: +4.4.8.8.in-addr.arpa. 0 IN PTR dns.google. + +Query time: 77 msec +SERVER: 172.28.96.1#53 (WSL internal DNS) + +### dig -x 1.1.2.2 +;; status: NXDOMAIN + +;; QUESTION SECTION: +;2.2.1.1.in-addr.arpa. IN PTR + +;; AUTHORITY SECTION: +1.in-addr.arpa. 1798 IN SOA ns.apnic.net. ... + +Query time: 1281 msec +SERVER: 172.28.96.1#53 (WSL internal DNS) + +### Comparison of results +8.8.4.4 successfully resolved to dns.google (valid PTR record). +1.1.2.2 returned NXDOMAIN, meaning no PTR record exists. +Reverse DNS availability depends on whether the IP owner configured PTR records. \ No newline at end of file From bf60a3056ce1b17d68e4c1f15326347a0e9501a3 Mon Sep 17 00:00:00 2001 From: Strelkov_Vladislav <79036529+StrVlad@users.noreply.github.com> Date: Tue, 3 Mar 2026 18:04:53 +0300 Subject: [PATCH 13/13] docs: add lab5 submission --- labs/submission5.md | 127 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 labs/submission5.md diff --git a/labs/submission5.md b/labs/submission5.md new file mode 100644 index 00000000..e4fa67f7 --- /dev/null +++ b/labs/submission5.md @@ -0,0 +1,127 @@ +# Lab 5 Submission + +## Task 1 — VirtualBox Installation + +- Host OS and version: Windows 11 +- VirtualBox version: 7.2.4 +- Installation issues: vmwgfx error fixed by adjusting display settings + +--- + +## Task 2 — Ubuntu VM and System Analysis + +### 2.1 VM Configuration + +- RAM: 4096 MB +- CPU cores: 2 +- Storage: 25 GB +- ISO source: https://ubuntu.com/download/desktop + +--- + +### 2.2 System Information Discovery + +#### Operating System + +Tools: lsb_release, uname + +Commands: +- lsb_release -a +- uname -a + +Output: +No LSB modules are available. +Distributor ID: Ubuntu +Description: Ubuntu 24.04.4 LTS +Release: 24.04 +Codename: noble + +Linux ubuntu 6.17.0-14-generic #14~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jan 15 15:52:10 UTC 2 x86_64 x86_64 x86_64 GNU/Linux +--- + +#### CPU Details + +Tool: lscpu + +Command: +- lscpu + +Output: +Architecture: x86_64 +CPU op-mode(s): 32-bit, 64-bit +Address sizes: 48 bits physical, 48 bits virtual +Byte Order: Little Endian +CPU(s): 2 +On-line CPU(s) list: 0,1 +Vendor ID: AuthenticAMD +Model name: AMD Ryzen 5 5600H with Radeon Graphics +CPU family: 25 +Model: 80 +Thread(s) per core: 1 +Core(s) per socket: 2 +Socket(s): 1 +Hypervisor vendor: KVM +Virtualization type: full + +--- + +#### Memory Information + +Tool: free + +Command: +- free -h + +Output: + total used free shared buff/cache available +Mem: 3.8Gi 1.3Gi 1.2Gi 38Mi 1.6Gi 2.5Gi +Swap: 3.8Gi 0B 3.8Gi + +--- + +#### Network Configuration + +Tool: ip + +Commands: +- ip a +- ip route + +Output: +2: enp0s3: mtu 1500 + inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3 + +default via 10.0.2.2 dev enp0s3 proto dhcp src 10.0.2.15 metric 100 +10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 metric 100 + +--- + +#### Storage Information + +Tools: df, lsblk + +Commands: +- df -hT +- lsblk -f + +Output: +Filesystem Type Size Used Avail Use% Mounted on +/dev/sda2 ext4 25G 9.3G 14G 40% / + +--- + +#### Virtualization Detection + +Tool: systemd-detect-virt + +Command: +- systemd-detect-virt + +Output: +oracle + +--- + +### Brief Reflection + +The most useful tools were lscpu, ip, and df because they provide concise and comprehensive system information. These commands allow quick inspection of hardware, network, and storage configuration inside the virtual machine. \ No newline at end of file