mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-03 01:10:13 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
fa56412410
@ -1,43 +1,39 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11104-1.html)
|
||||
[#]: subject: (Pipx – Install And Run Python Applications In Isolated Environments)
|
||||
[#]: via: (https://www.ostechnix.com/pipx-install-and-run-python-applications-in-isolated-environments/)
|
||||
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
||||
|
||||
Pipx - 在隔离环境中安装和运行 Python 应用
|
||||
Pipx:在隔离环境中安装和运行 Python 应用
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
始终建议在虚拟环境中安装 Python 应用以避免彼此冲突。**Pip 包管理器**帮助我们在隔离的环境中安装 Python 应用,我们使用两个工具,即 **venv** 和 **virtualenv**。还有一个 Python.org 推荐的名为 [**“Pipenv”**][2] 的 Python 包管理器用来安装 Python 应用。与 Pip 不同,Pipenv 默认自动创建虚拟环境。这意味着你不再需要为项目手动创建虚拟环境。今天,我偶然发现了一个名为 **“Pipx”** 的类似工具,它是一个免费的开源程序,允许你在隔离的虚拟环境中安装和运行 Python 应用。
|
||||
|
||||
使用 Pipx,我们可以轻松安装 **PyPI** 中托管的数千个 Python 应用,而不会有太多麻烦。好的是,你可以使用常规用户权限执行所有操作。你不需要成为 “root” 用户或不需要具有 “sudo” 权限。值得一提的是,**Pipx 可以从临时环境**运行程序,而无需安装它。当你经常测试同一程序的多个版本时,这将非常方便。随 Pipx 一起安装的软件包可以随时列出,升级或卸载。Pipx 是一个跨平台的程序,因此它可以在 Linux、Mac OS 和 Windows 上运行。
|
||||
我们始终建议在虚拟环境中安装 Python 应用以避免彼此冲突。Pip 包管理器可以帮助我们在隔离的环境中安装 Python 应用,我们使用两个工具,即 `venv` 和 `virtualenv`。还有一个 Python.org 推荐的名为 [Pipenv][2] 的 Python 包管理器也可以用来安装 Python 应用。与 Pip 不同,Pipenv 默认会自动创建虚拟环境。这意味着你不再需要为项目手动创建虚拟环境。今天,我偶然发现了一个名为 “Pipx” 的类似工具,它是一个自由开源程序,允许你在隔离的虚拟环境中安装和运行 Python 应用。
|
||||
|
||||
使用 Pipx,我们可以轻松安装 PyPI 中托管的数千个 Python 应用,而不会有太多麻烦。好的是,你可以使用常规用户权限执行所有操作。你不需要成为 “root” 用户或不需要具有 “sudo” 权限。值得一提的是,Pipx 可以从临时环境运行程序,而无需安装它。当你经常测试同一程序的多个版本时,这将非常方便。随 Pipx 一起安装的软件包可以随时列出、升级或卸载。Pipx 是一个跨平台的程序,因此它可以在 Linux、Mac OS 和 Windows 上运行。
|
||||
|
||||
### 安装 Pipx
|
||||
|
||||
**Python 3.6+ **、** Pip** 和 **venv** 模块是安装 pipx 所必需的。确保按照以下指南中的说明安装它们。
|
||||
Python 3.6+ 、Pip 和 `venv` 模块是安装 `pipx` 所必需的。确保按照以下指南中的说明安装它们。
|
||||
|
||||
* [**如何使用 Pip 管理 Python 包**][3]
|
||||
* [如何使用 Pip 管理 Python 包][3]
|
||||
|
||||
|
||||
|
||||
此处,需要 venv 来创建虚拟环境。
|
||||
此处,需要 `venv` 来创建虚拟环境。
|
||||
|
||||
接下来,运行以下命令安装 Pipx。
|
||||
|
||||
```
|
||||
$ python3 -m pip install --user pipx
|
||||
|
||||
$ python3 -m userpath append ~/.local/bin
|
||||
```
|
||||
|
||||
pipx 二进制文件的默认位置是 **~/.local/bin**。你可以使用 **PIPX_BIN_DIR** 环境变量覆盖它。如果要覆盖 **PIPX_BIN_DIR**,只需运行 **userpath append $PIPX_BIN_DIR** ,确保它在你的路径中。
|
||||
`pipx` 二进制文件的默认位置是 `~/.local/bin`。你可以使用 `PIPX_BIN_DIR` 环境变量覆盖它。如果要覆盖 `PIPX_BIN_DIR`,只需运行 `userpath append $PIPX_BIN_DIR`,确保它在你的路径中。
|
||||
|
||||
Pipx 的默认虚拟环境位置是 **~/.local/pipx**。这可以用环境变量 **PIPX_HOME** 覆盖。
|
||||
Pipx 的默认虚拟环境位置是 `~/.local/pipx`。这可以用环境变量 `PIPX_HOME` 覆盖。
|
||||
|
||||
让我们继续看看如何使用 Pipx 安装 Python 应用。
|
||||
|
||||
@ -45,17 +41,17 @@ Pipx 的默认虚拟环境位置是 **~/.local/pipx**。这可以用环境变量
|
||||
|
||||
以下是 Pipx 入门的几个例子
|
||||
|
||||
##### 安装 Python 包
|
||||
#### 安装 Python 包
|
||||
|
||||
要全局安装 Python 应用,例如 **cowsay**,请运行:
|
||||
要全局安装 Python 应用,例如 cowsay,请运行:
|
||||
|
||||
```
|
||||
$ pipx install cowsay
|
||||
```
|
||||
|
||||
此命令将自动创建虚拟环境,在其中安装包并包的可执行文件放在 **$PATH** 中。
|
||||
此命令将自动创建虚拟环境,在其中安装包并包的可执行文件放在 `$PATH` 中。
|
||||
|
||||
**示例输出:**
|
||||
示例输出:
|
||||
|
||||
```
|
||||
installed package cowsay 2.0.3, Python 3.6.8
|
||||
@ -66,7 +62,7 @@ done! ✨ 🌟 ✨
|
||||
|
||||
![1][4]
|
||||
|
||||
使用 Pipx 安装 Python 应用
|
||||
*使用 Pipx 安装 Python 应用*
|
||||
|
||||
让我们测试新安装的 cowsay 程序:
|
||||
|
||||
@ -74,7 +70,7 @@ done! ✨ 🌟 ✨
|
||||
|
||||
在这里,我从官方网站上摘取了这些例子。你可以安装/测试任何其他的 Python 包。
|
||||
|
||||
##### 列出 Python 包
|
||||
#### 列出 Python 包
|
||||
|
||||
要使用 Pipx 列出所有已安装的应用,请运行:
|
||||
|
||||
@ -97,7 +93,7 @@ package cowsay 2.0.3, Python 3.6.8
|
||||
nothing has been installed with pipx 😴
|
||||
```
|
||||
|
||||
##### 升级包
|
||||
#### 升级包
|
||||
|
||||
要升级包,只需执行以下操作:
|
||||
|
||||
@ -111,9 +107,9 @@ $ pipx upgrade cowsay
|
||||
$ pipx upgrade-all
|
||||
```
|
||||
|
||||
##### 从临时虚拟环境运行应用
|
||||
#### 从临时虚拟环境运行应用
|
||||
|
||||
有时,你可能希望运行特定的 python 程序,但并不实际安装它。
|
||||
有时,你可能希望运行特定的 Python 程序,但并不实际安装它。
|
||||
|
||||
```
|
||||
$ pipx run pycowsay moooo
|
||||
@ -121,9 +117,9 @@ $ pipx run pycowsay moooo
|
||||
|
||||
![1][6]
|
||||
|
||||
在临时隔离虚拟环境中运行 Python 应用
|
||||
*在临时隔离虚拟环境中运行 Python 应用*
|
||||
|
||||
此命令实际上并不安装指定程序,而是从临时虚拟环境运行它。你可以使用此命令快速测试 python 应用。
|
||||
此命令实际上并不安装指定程序,而是从临时虚拟环境运行它。你可以使用此命令快速测试 Python 应用。
|
||||
|
||||
你甚至可以直接运行 .py 文件。
|
||||
|
||||
@ -132,7 +128,7 @@ $ pipx run https://gist.githubusercontent.com/cs01/fa721a17a326e551ede048c5088f9
|
||||
pipx is working!
|
||||
```
|
||||
|
||||
##### 卸载软件包
|
||||
#### 卸载软件包
|
||||
|
||||
可以使用以下命令卸载软件包:
|
||||
|
||||
@ -146,7 +142,7 @@ $ pipx uninstall cowsay
|
||||
$ pipx uninstall-all
|
||||
```
|
||||
|
||||
##### 获得帮助
|
||||
#### 获得帮助
|
||||
|
||||
要查看帮助部分,请运行:
|
||||
|
||||
@ -156,9 +152,9 @@ $ pipx --help
|
||||
|
||||
就是这些了。如果你一直在寻找安全,方便和可靠的程序来安装和运行 Python 应用,Pipx 可能是一个不错的选择。
|
||||
|
||||
**资源:**
|
||||
资源:
|
||||
|
||||
* [**Pipx 的 GitHub 仓库**][7]
|
||||
* [Pipx 的 GitHub 仓库][7]
|
||||
|
||||
|
||||
|
||||
@ -168,8 +164,8 @@ via: https://www.ostechnix.com/pipx-install-and-run-python-applications-in-isola
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
82
published/20191110 What is DevSecOps.md
Normal file
82
published/20191110 What is DevSecOps.md
Normal file
@ -0,0 +1,82 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (PandaWizard)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11102-1.html)
|
||||
[#]: subject: (What is DevSecOps?)
|
||||
[#]: via: (https://opensource.com/article/19/1/what-devsecops)
|
||||
[#]: author: (Brett Hunoldt https://opensource.com/users/bretthunoldtcom)
|
||||
|
||||
什么是 DevSecOps?
|
||||
======
|
||||
|
||||
> DevSecOps 的实践之旅开始于 DevSecOps 增权、赋能和培养。下面就介绍如何开始学习使用 DevSecOps。
|
||||
|
||||

|
||||
|
||||
> Stephen Streichsbier 说过: DevSecOps 使得组织可以用 DevOps 的速度发布内在安全的软件。
|
||||
|
||||
DevSecOps 是一场关于 DevOps 概念实践或艺术形式的变革。为了更好理解 DevSecOps,你应该首先理解 DevOps 的含义。
|
||||
|
||||
DevOps 起源于通过合并开发和运维实践,消除隔离,统一关注点,提升团队和产品的效率和性能。它是一种注重于构建容易维护和易于平常自动运营的产品和服务的新型协作方式。
|
||||
|
||||
安全在很多团队中都是常见的隔离点。安全的核心关注点是保护团队,而有时这也意味着创建延缓新服务或是新产品发布的障碍或策略,用于保障任何事都能被很好的理解和安全的执行,并且没有给团队带来不必要的风险。
|
||||
|
||||
因为安全隔离点方面的明显特征和它可能带来的摩擦,开发和运维有时会避开安全要求以满足客观情况。在一些公司,这种隔离形成了一种产品安全完全是安全团队责任的期望,并取决于安全团队去寻找产品的安全缺陷或是可能带来的问题。
|
||||
|
||||
DevSecOps 看起来是通过给开发或是运维角色加强或是建立安全意识,或是在产品团队中引入一个安全工程师角色,在产品设计中找到安全问题,从而把安全要求汇聚在 Devops 中。
|
||||
|
||||
这样使得公司能更快发布和更新产品,并且充分相信安全已经嵌入产品中。
|
||||
|
||||
### 坚固的软件哪里适用 DevSecOps?
|
||||
|
||||
建造坚固的软件是 DevOps 文化的一个层面而不是一个特别的实践,它完善和增强了 DevSecOps 实践。想想一款坚固的软件就像是某些经历过残酷战斗过程的事物。
|
||||
|
||||
有必要指出坚固的软件并不是 100% 安全可靠的(虽然它可能最终是在某些方面)。然而,它被设计成可以处理大部分被抛过来的问题。
|
||||
|
||||
践行坚固软件最重要的原则是促进竞争、实践、可控的失败与合作。
|
||||
|
||||
### 你该如何开始学习 DevSecOps ?
|
||||
|
||||
开始实践 DevSecOps 涉及提升安全需求和在开发过程中尽可能早的阶段进行实践。它最终在公司文化上提升了安全的重要性,使得安全成为所有人的责任,而并不只是安全团队的责任。
|
||||
|
||||
你可能在团队中听说过“<ruby>左上升<rt>shift left</rt></ruby>”这个词,如果你把开发周期线扁平化到一条横线上,以包括产品变革的的关键时期:从初始化到设计、建造、测试以及最终的运行,安全的目的就是尽早的参与进来。这使得风险可以在设计中能更好的评估、交流和减轻。“左提升”的含义是指促使安全能在开发周期线上更往左走。
|
||||
|
||||
这个过程始于三个关键要素:
|
||||
|
||||
* <ruby>增权<rt>empowerment</rt></ruby>
|
||||
* <ruby>赋能<rt>enablement</rt></ruby>
|
||||
* <ruby>培养<rt>education</rt></ruby>
|
||||
|
||||
增权,在我看来,是关于释放控制权以及使得团队(在理性分析下)做出独立决定而不用害怕失败或影响。这个过程的唯一告诫信息就是要严格的做出明智的决定(不要比这更低要求)。
|
||||
|
||||
为了实现增权,商务和行政支持(通过内部销售、展示来建立,通过建立矩阵来展示这项投资的回报)是打破历史障碍和割裂的团队的关键。合并安全人员到开发和运维团队中,提升交流和透明度有助于开始 DevSecOps 之旅。
|
||||
|
||||
这个整合和移动使得团队只关注单一的结果:打造一个他们共同负责的产品,让开发和安全人员相互依赖合作。这将引领你们共同走向增权。这是产品研发团队的共同责任,并保证每个可分割的产品都保持其安全性。
|
||||
|
||||
赋能涉及正确的使用掌握在团队手中的工具和资源。这是建立一种通过论坛、维基、信息聚合的知识分享文化。
|
||||
|
||||
打造一种注重自动化、重复任务应该编码来尽可能减少以后的操作并增强安全性的理念。这种场景不仅仅是提供知识,而是让这种知识能够通过多种渠道和媒介(通过某些工具)可获取,以便它可以被团队或是个人以他喜欢的方式去消化和分享。当团队成员正在编码时一种媒介可能工作的很好,而当他们在进行中时另一种可能更好。让工具简单可用,让团队用上它们。
|
||||
|
||||
不同的 DevSecOps 团队有不同的喜好,因此允许他们尽可能的保持独立。这是一个微妙的平衡工作,因为你确实希望实现规模经济和产品间共享的能力。在选择中协作和参与,并更新工具方法有助于减少使用中的障碍。
|
||||
|
||||
最后,也可能是最重要的,DevSecOps 是有关训练和兴趣打造。聚会、社交或是组织中通常的报告会都是让同事们教学和分享他们的知识的很棒的方式。有时,这些会突出其他人可能没有考虑过的共同挑战、顾虑或风险。分享和教学也是一种高效的学习和指导团队的方法。
|
||||
|
||||
在我个人经验中,每个团队的文化都是独一无二的,因此你不能用一种“普适”的方法。走进你的团队并找到他们想要使用的工具方法。尝试不同的论坛和聚会并找出最适用于你们文化的方式。寻找反馈并询问团队如何工作,他们喜欢什么以及对应的原因。适应和学习,保持乐观,不要停止尝试,你们将会有所收获。
|
||||
|
||||
- [下载 DevSecOps 的入门手册][1]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/1/what-devsecops
|
||||
|
||||
作者:[Brett Hunoldt][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[PandaWizard](https://github.com/PandaWizard)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/bretthunoldtcom
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/downloads/devsecops
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (zmaster-zhang)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -0,0 +1,162 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Type Linux Commands In Capital Letters To Run Them As Sudo User)
|
||||
[#]: via: (https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/)
|
||||
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
||||
|
||||
Type Linux Commands In Capital Letters To Run Them As Sudo User
|
||||
======
|
||||
|
||||
![Type Linux Commands In Capital Letters To Run Them As Sudo User][1]
|
||||
|
||||
The reason I love Linux community a lot is they create so many FUN projects which you rarely find in any other propriety operating systems. A while ago, we looked at a fun project named [**“Hollywood”**][2] which turns the Terminal into a Hollywood technical melodrama hacker interface in Ubuntu-like systems. There are few other utilities available, for example **cowsay** , **fortune** , **sl** and **toilet** (!) etc., to kill your free time and keep you entertained! They may not be useful, but these utilities are really entertaining and fun to use. Today, I stumbled upon yet another similar utility named **“SUDO”**. As the name implies, whenever you type Linux commands in capital letters, the SUDO utility will run them as sudo user! Meaning, you need not to type “sudo” in-front of the Linux commands you about to run. Cool, yeah?
|
||||
|
||||
### Install SUDO
|
||||
|
||||
* * *
|
||||
|
||||
**A word of caution:**
|
||||
|
||||
Before installing this (or any utility), take a look at the source code (Link given at the end) and see if there are suspicious/malicious code included to harm your system. Test it in a VM. If you like or found it useful, you can use it in your personal/production systems.
|
||||
|
||||
* * *
|
||||
|
||||
Git clone the SUDO repository:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/jthistle/SUDO.git
|
||||
```
|
||||
|
||||
This command will clone the contents of SUDO GIT repository and saves them in a directory named “SUDO” in your current working directory.
|
||||
|
||||
```
|
||||
Cloning into 'SUDO'...
|
||||
remote: Enumerating objects: 42, done.
|
||||
remote: Counting objects: 100% (42/42), done.
|
||||
remote: Compressing objects: 100% (29/29), done.
|
||||
remote: Total 42 (delta 17), reused 30 (delta 12), pack-reused 0
|
||||
Unpacking objects: 100% (42/42), done.
|
||||
```
|
||||
|
||||
Switch to SUDO directory:
|
||||
|
||||
```
|
||||
$ cd SUDO/
|
||||
```
|
||||
|
||||
And, install it using command:
|
||||
|
||||
```
|
||||
$ ./install.sh
|
||||
```
|
||||
|
||||
The command will add the following entries in your **~/.bashrc** file:
|
||||
|
||||
```
|
||||
[...]
|
||||
# SUDO - shout at bash to su commands
|
||||
# Distributed under GNU GPLv2, @jthistle on github
|
||||
|
||||
shopt -s expand_aliases
|
||||
|
||||
IFS_=${IFS}
|
||||
IFS=":" read -ra PATHS <<< "$PATH"
|
||||
|
||||
for i in "${PATHS[@]}"; do
|
||||
for j in $( ls "$i" ); do
|
||||
if [ ${j^^} != $j ] && [ $j != "sudo" ]; then
|
||||
alias ${j^^}="sudo $j"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
alias SUDO='sudo $(history -p !!)'
|
||||
|
||||
IFS=${IFS_}
|
||||
|
||||
# end SUDO
|
||||
```
|
||||
|
||||
It will also take a backup of your **~/.bashrc** and save it as **~/.bashrc.old**. You can restore it if anything goes catastrophically wrong.
|
||||
|
||||
Finally, update the changes using command:
|
||||
|
||||
```
|
||||
$ source ~/.bashrc
|
||||
```
|
||||
|
||||
### Now, type Linux Commands in Capital letters to run them as Sudo user
|
||||
|
||||
Usually, we execute Linux commands that requires sudo/root privileges like below.
|
||||
|
||||
```
|
||||
$ sudo mkdir /ostechnix
|
||||
```
|
||||
|
||||
Right? Yes! The above command will create directory named “ostechnix” in root (/). Let us cancel this command using **Ctrl+c**.
|
||||
|
||||
Once SUDO is installed, you can **type any Linux command in capital without sudo** and run them. So, you can run the above command like below:
|
||||
|
||||
```
|
||||
$ MKDIR /ostechnix
|
||||
|
||||
$ TOUCH /ostechnix/test.txt
|
||||
|
||||
$ LS /ostechnix
|
||||
```
|
||||
|
||||
![][3]
|
||||
|
||||
Type Linux Commands In Capital Letters To Run Them As Sudo User
|
||||
|
||||
Please note that **it will not bypass the sudo password**. You still need to type sudo password to execute the given command. It will only help to avoid typing “sudo” in-front of each command.
|
||||
|
||||
* * *
|
||||
|
||||
**Related read:**
|
||||
|
||||
* [**How To Run Particular Commands Without Sudo Password In Linux**][4]
|
||||
* [**How To Restore Sudo Privileges To A User**][5]
|
||||
* [**How To Grant And Remove Sudo Privileges To Users On Ubuntu**][6]
|
||||
* [**How To Find All Sudo Users In Your Linux System**][7]
|
||||
* [**How To Display Asterisks When You Type Password In Terminal**][8]
|
||||
* [**How To Change The Sudo Prompt In Linux**][9]
|
||||
|
||||
|
||||
|
||||
* * *
|
||||
|
||||
Of course, typing “sudo” will take only a few seconds, so it is not a big deal. I must tell this is just fun and USELESS project to pass time. If you don’t like it, go away and learn something useful. If you like it, give it a go and have fun!
|
||||
|
||||
**Resource:**
|
||||
|
||||
* [**SUDO GitHub Repository**][10]
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/type-linux-commands-in-capital-letters-to-run-them-as-sudo-user/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/sudo-720x340.png
|
||||
[2]: https://www.ostechnix.com/turn-ubuntu-terminal-hollywood-technical-melodrama-hacker-interface/
|
||||
[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/SUDO-in-action.gif
|
||||
[4]: https://www.ostechnix.com/run-particular-commands-without-sudo-password-linux/
|
||||
[5]: https://www.ostechnix.com/how-to-restore-sudo-privileges-to-a-user/
|
||||
[6]: https://www.ostechnix.com/how-to-grant-and-remove-sudo-privileges-to-users-on-ubuntu/
|
||||
[7]: https://www.ostechnix.com/find-sudo-users-linux-system/
|
||||
[8]: https://www.ostechnix.com/display-asterisks-type-password-terminal/
|
||||
[9]: https://www.ostechnix.com/change-sudo-prompt-linux-unix/
|
||||
[10]: https://github.com/jthistle/SUDO
|
@ -1,85 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (PandaWizard)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What is DevSecOps?)
|
||||
[#]: via: (https://opensource.com/article/19/1/what-devsecops)
|
||||
[#]: author: (Brett Hunoldt https://opensource.com/users/bretthunoldtcom)
|
||||
|
||||
什么是 DevSecOps?
|
||||
======
|
||||
DevSecOps 的实践之旅开始于 DevSecOps 授权,启用和培养。下面就介绍如何开始学习使用 DevSecOps。
|
||||

|
||||
|
||||
> Stephen Streichsbier 说过: DevSecOps 使得组织可以用 DevOps 的速度发布内在安全的软件。
|
||||
|
||||
DevSecOps 是一场关于 DevOps 概念实践或艺术形式的变革。为了更好理解 DevSecOps,你应该首先理解 DevOps 的含义。
|
||||
|
||||
DevOps 起源于通过合并开发和运维实践,消除隔离,统一关注点,提升团队和产品的效率和性能。它是一种注重构建容易维持和易于平常自动运营维护产品和服务的新型协作方式。
|
||||
|
||||
安全在很多团队中都是常见的隔离点。安全的核心关注点是保护团队,而有时这也意味着生成延缓新服务或是新产品发布的障碍或是策略,用于保障任何事都能被很好的理解和安全的执行,并且没有给团队带来不必要的风险。
|
||||
|
||||
**[[点击下载 DevSecOps 的引导手册]][1]**
|
||||
|
||||
因为安全方面的明显特征和它可能带来的摩擦,开发和运维有时会避开或是满足客观的安全要求。在一些公司,这种隔离形成了一种产品安全完全是安全团队责任的期望,并取决于安全团队去寻找产品的安全缺陷或是可能带来的问题。
|
||||
|
||||
DevSecOps 看起来是通过给开发或是运维角色加强或是建立安全意识,或是在产品团队中引入一个安全工程师角色,在产品设计中找到安全问题,从而把安全要求汇聚在 Devops 中。
|
||||
|
||||
这样使得公司能更快发布和更新产品,并且充分相信安全已经嵌入产品中。
|
||||
|
||||
### 坚固的软件哪里适用 DevSecOps?
|
||||
|
||||
建造坚固的软件是 DevOps 文化的一个层面而不是一个特别的实践,它完善和增强了 DevSecops 的实践。想想一款坚固的软件就像是某些经历过残酷战斗过程的事物。
|
||||
|
||||
有必要指出坚固的软件并不是 100% 安全可靠的(虽然它可能最终是在某些方面)。然而,它被设计成可以处理大部分被抛过来的问题。
|
||||
|
||||
践行坚固软件最重要的原则是促进竞争,实践,可控的失败与合作。
|
||||
|
||||
### 你如何开始学习 DevSecOps ?
|
||||
|
||||
开始实践 DevSecOps 涉及提升安全需求和在开发过程中最早期可能的阶段实践。它最终在公司文化上提升了安全的重要性,使得安全成为所有人的责任,而并不只是安全团队的责任。
|
||||
|
||||
你可能在团队中听说过“左上升”这个词,如果你把开发周期包括产品变革的的关键时期线放平在一条横线上,从初始化到设计,建造,测试以及最终的运行。安全的目的就是今早的参与进来。这使得风险可以在设计中能更好的评估、交流和减轻。“左提升”的含义是指促使安全能在开发周期线上更往左走。
|
||||
|
||||
这篇入门文章有三个关键要素:
|
||||
|
||||
* 授权
|
||||
* 启用
|
||||
* 培养
|
||||
|
||||
|
||||
|
||||
授权,在我看来,是关于释放控制权以及使得团队做出独立决定而不用害怕失败或影响(理性分析)。这个过程的唯一告诫信息就是要严格的做出明智的决定(不要比这更低要求)。
|
||||
|
||||
为了实现授权,商务和行政支持(通过内部销售,展示来建立,通过建立矩阵来 展示这项投资的回报)是打破历史障碍和分割的团队的关键。合并安全人员到开发和运维团队中,提升交流和透明度透明度有助于 DevSecOps 的开始之旅。
|
||||
|
||||
这次整合和移动使得团队只关注单一的结果:打造一个他们共同负责的产品,让开发和安全人员相互依赖合作。这将引领你们共同走向授权。这是产品研发团队的共同责任,并保证每个可分割的产品都保持其安全性。
|
||||
|
||||
启用涉及正确的使用掌握在团队手中的工具和资源。这是准备建立一种通过论坛、维基、信息聚合的知识分享文化。
|
||||
|
||||
打造一种注重自动化、重复任务应该编码来尽可能减少以后的操作并增强安全性。这种场景不仅仅是提供知识,而是让这种知识能够通过多种渠道和媒介(通过某些工具)可获取,以便它可以被团队或是个人以他喜欢的方式去消化和分享。一种工具可以更好的实现当团队成员正在编码而另一组成员正在来的路上。让工具简单可用和让团队可以使用它们。
|
||||
|
||||
不同的 DevSecOps 团队有不同的喜好,因此允许它们尽可能的保持独立。这是一种微笑平衡的练习,因为你真的很想在经济规模和能力中分享产品。在选择中协作参与并更新工具方法有助于减少使用中的障碍。
|
||||
|
||||
最后,也可能是最重要的, DevSecOps 是有关训练和兴趣打造。聚会、社交或是组织中通常的报告会都是很棒的方式让同事们教学和分享他们的知识。有时,这些高光的被分享的挑战、关注点或是一些其他人没有关注到的风险。分享和教学也是一种高效的学习和指导团队的方法。
|
||||
|
||||
在我个人经验中,每个团队的文化都是独一无二的,因此你不能用“一种尺寸适合所有”的方法。走进你的团队并找到他们想要使用的工具方法。尝试不同的论坛和聚会并找出最适用于你们文化的方式。寻找反馈并询问团队如何工作,他们喜欢什么以及对应的原因。适应和学习,保持乐观,不要停止尝试,你们将会有所收获。
|
||||
|
||||
[下载 DevSecOps 的入门手册][1]
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/1/what-devsecops
|
||||
|
||||
作者:[Brett Hunoldt][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[PandaWizard](https://github.com/PandaWizard)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/bretthunoldtcom
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/downloads/devsecops
|
Loading…
Reference in New Issue
Block a user