# Flare Activity and Magnetic Feature Analysis of the Flare Stars II: Sub-
Giant Branch

Hadis Goodarzi School of Astronomy, Institute for Research in Fundamental
Sciences (IPM)
P.O. Box 19395-5746, Tehran, Iran  Ahmad Mehrabi  Department of Physics, Bu
Ali Sina University
65178, 016016, Hamedan, Iran  School of Astronomy, Institute for Research in
Fundamental Sciences (IPM)
P.O. Box 19395-5746, Tehran, Iran  Habib G.Khosroshahi  School of Astronomy,
Institute for Research in Fundamental Sciences (IPM)
P.O. Box 19395-5746, Tehran, Iran  Han He  CAS Key Laboratory of Solar
Activity
National Astronomical Observatories, Chinese Academy of Sciences
Beijing, People’s Republic of China

(Received February 20, 2020; Revised November 4, 2020; Accepted November 4,
2020)

###### Abstract

We present an investigation of the magnetic activity and flare characteristics
of the sub-giant stars mostly from F and G spectral types and compare the
results with the main-sequence (MS) stars. The light curve of 352 stars on the
sub-giant branch (SGB) from the Kepler mission is analyzed in order to infer
stability, relative coverage and contrast of the magnetic structures and also
flare properties using three flare indexes. The results show that: (i)
Relative coverage and contrast of the magnetic features along with rate, power
and magnitude of flares increase on the SGB due to the deepening of the
convective zone and more vigorous magnetic field production (ii) Magnetic
activity of the F and G-type stars on the SGB does not show dependency to the
rotation rate and does not obey the saturation regime. This is the opposite of
what we saw for the main sequence, in which the G-, K- and M-type stars show
clear dependency to the Rossby number; (iii) The positive relationship between
the magnetic features stability and their relative coverage and contrast
remains true on the SGB, though it has lower dependency coefficient in
comparison with the MS; (iv) Magnetic proxies and flare indexes of the SGB
stars increase with increasing the relative mass of the convective zone.

methods: data analysis — stars: activity — stars: magnetic field— stars: flare
— stars: rotation —stars: starspots

††journal: ApJ

##  1 Introduction

The study of stellar magnetic activity is of primary importance to better
understand the formation and evolution of the stars. Flare activity can have
physical and chemical impacts on the early phase of the star and planet
formation because its ionizing radiation affects the degree of ionization in
accretion disk of the young stellar objects (Benz & Güdel, 2010; Herbst &
Klemperer, 1973; Dalgarno & Black, 1976; Herbst & van Dishoeck, 2009). Stellar
brightness modulation and flare events are the most outstanding magnetic
activity indicators that can be inferred from the observed light curves.

Kepler mission has made it possible to study the light-curve of more than
195000 targets. The initial purpose of this mission was to detect the earth
like planets in the habitable zone of stars (Borucki et al., 2010; Koch et
al., 2010). However, its long duration and continuous observations, along with
high precision photometry, provides the possibility of studying the magnetic
and flare activity for a large sample of stars (Basri et al., 2010, 2011;
Chaplin et al., 2011; Frasca et al., 2011; Kurtz et al., 2011; Walkowicz et
al., 2011). Analyzing the observations of a large number of stars with the
same instrumental setup, data reduction and observing techniques decreases the
random errors and increases the robustness of the results (Jenkins et al.,
2011); this is one of the great benefits of the data provided by the Kepler
mission.

In the stellar dynamo model, surface activity of stars is the result of
interaction between the magnetic field, rotation and convection itself or a
thin shear zone between the convective and radiative zone (Parker, 1955, 1970;
Steenbeck & Krause, 1969; Moffatt, 1978; Gilman, 1983; Glatzmaier, 1984;
Spruit, 2002), so the strength of produced magnetic field depends on the
rotation rate and the volume of convective envelope (Walter, 1981; Vilhu,
1984).

Magnetic activity studies on the samples of main-sequence stars (Vaughan et
al., 1981; Galloway&Weiss, 1981; Mangeney&Praderie, 1984; Noyes et al., 1984;
Vilhu, 1984; Simon et al., 1985; Middelkoop, 1982) confirms that the magnetic
activity has positive correlation with the rotation rate, i.e., by decreasing
rotation period, magnetic activity increases. However, at high rotation rates,
most of the activity indicators saturate and do not increase further (Noyes et
al., 1984; Vilhu, 1984; Vilhu&Walter, 1987). This saturation regime has been
also verified using spectroscopic data and magnetic field sensitive lines;
however, rotational line broadening in fast rotators prevents measuring the
magnetic flux in the regime of saturated activity Reiners2009.

In the subgiant phase, Helium burning has been ceased in the core and
commenced in a shell outside the core. Thus, the star is brighter than a
normal main-sequence star of the same spectral class, but not as bright as the
giant stars (Adams et al., 1935). The core of the star contracts and its
envelope expands when the star leave the main sequence (MS) to the subgiant
branch (SGB), so the moment of inertia increases. Furthermore, as even hot
rapidly rotating stars ($>$6200K) develop convective envelope on the SGB,
wind-driven angular momentum loss can occur for both fast and slow rotating
stars when they leave the MS (Hoyle, 1960; Schatzman, 1962; Gray, 1989;
Schrijver & Pols, 1993; Van Saders & Pinsonneault, 2013).

Up to now, most of the statistical activity studies have been done on the main
sequence and giant stars (Haisch&Simon, 1982; Fekel&Balachandran, 1993;
Dempsey et al., 1993; Notsu et al., 2013; Shibayama et al., 2013; He et al.,
2015; Mehrabi et al., 2017) and less attention has been paid to the subgiant
branch as the intermediate evolutionary state of the stars between dwarfs and
giants (Strömberg, 1930; Sandage et al., 2003), while considering magnetic
activity and other phenomena in giant and subgiant stars may help researchers
to better understand the mechanism of such events on the main sequence stars
(Katsova et al., 2018). For ex. Lambert&Ries (1981) studied Carbon, Nitrogen
and Oxygen abundance of 32 giants and subgiants from G and K spectral types.
By evaluating of the amount of processed material dredging to the surface of
these stars, they concluded that mixing occurs in the radiative zone - between
the core and the outer convective zone - of the main sequence stars.

However, when comparing the young and evolved stars with each other or
extending their results, different preliminary conditions ot them should be
taken into account. For ex. Judge (1986) analyzed emission lines formed in the
outer atmosphere of late-type giant stars. He found that these emission lines
of low-gravity stars are formed in lower temperatures than those at which they
would be formed in a solar-type chromospheric and transition region. Also, by
analyzing X-ray and ultraviolet observations of 91 targets from spectral type
F-K, Ayres et al. (1995) found that coronal activity becomes progressively
more sensitive to the spectral types when the star leaves the MS.

Ayres&Linsky (1980) studied Capella system consisting of three similar giants
stars (we now know that it is a quadruple system), they concluded that the
origin of the extraordinary high -chromospheric and transition region-activity
level of the late-F secondary is due to its higher rotation rate.
Middelkoop&Zwaan (1981) used Wilson (1976) eye estimation of the CaII H and K
emission intensities for 500 evolved stars. They concluded that rapidly
rotating G-type giants tend to show enhanced CaII H and K emissions and
suggested that this is probably true among other spectral types of giants and
subgiants.

Simon & Drake (1989) analyzed a sample of cool giant and subgiant stars by
focusing on their C II 1335A and C IV 1550A emission lines forming in high
chromosphere and transition region, respectively. They found strong
correlation between the activity and rotation in the stars later than F5,
however, emission of early F stars is independent of the rotation rate.
García-Alvarez et al. (2006) analyzed high resolution Chandra X-ray spectra of
late-type giants in different main stages of their lifetime, they suggested
that the structural changes during the evolution of late type giants could be
the reason of observed differences in coronal abundances and temperature
structure. Particularly, the size of the convective zone coupled with the
rotation rate has the dominant role in coronal characteristics.

At first, the number of subgiants was underestimated in the initial Kepler
Input Catalog (KIC) and the KSPC revisions (Huber et al., 2011; Huber, 2014)
because the surface gravity determination was carried out by broadband
photometry which is not accurate enough. Later, other calculations of surface
gravity by short-timescale brightness variations or ”flicker” showed that
nearly 50% of the bright planet-host stars are subgiants (Bastien et al.,
2014). By combining Gaia Data Release 2 parallaxes with the Kepler stellar
properties Catalog, Berger et al. (2018) reported the revised radii and
evolutionary state of 177,911 Kepler stars. They found that about 67% (120000)
of all Kepler targets are main-sequence stars, 21% (37000) subgiants, and 12%
(21000) red giants.

In our previous paper (Goodarzi et al. (2019), hereafter paper I) we analyzed
1740 main-sequence stars from F, G, K and M spectral types and studied
relationship between the magnetic feature characteristics and the identified
flare activity. In this paper, we focus on the magnetic properties and flare
activity of the subgiant stars and compare the results with the main-sequence.
In section 2, we explain our data selection, then, magnetic proxies and flare
indexes are described in section 3. Results and discussion are presented in
section 4, and finally, we conclude in section 5.

##  2 Data Selection and processing

We select subgiant stars from the revised radii and evolutionary state catalog
by Berger et al. (2018). We choose the targets that their flare activity was
confirmed in either of the catalogs by Davenport (2016) or Van Doorsselaere et
al. (2017), and their rotation period was determined in the catalog by
McQuillan et al. (2014). We also remove all the binary candidates reported by
Berger et al. (2018). Final sample contains 352 single-, flare-, subgiant
stars (101 F-, 234 G- and 17 K-type). Long-cadence data from quarters Q2-Q16
(data release 25) are selected for analysis and other quarters are neglected
because of their short duration.

In order to detect flare spikes automatically, we use our automated routine
which was described in Goodarzi et al. (2019). In this routine, first we
extract gradual component ($F_{G}$) that is the main fluctuation component of
the light curve due to the rotation modulation by the magnetic features, see
middle panels of figure 1. Then, by subtracting normalized gradual component
($f_{G}$) from the normalized flux (f), we obtain flare component ($f_{F}$),
see bottom panels of figure 1. We select the three times of the standard
deviation of running difference ($3*\sigma$) as the threshold value for flare
detection (red horizontal lines in the bottom panels of figure1). For more
details about the procedure, please see paper I. Eventually, a total number of
86067 flares are found on the 352 subgiant stars.

Figure 1: The light curve of two Kepler targets (KIC 6292732, left) and (KIC
11957046, right) with different magnitude of light curve variations and hence
magnetic activity levels. Top panels show the normalized flux (f), the middle
panels are normalized gradual component ($f_{G}$) and bottom panels are
normalized flare component ($f_{F}$). The height of red horizontal lines in
the bottom panels shows threshold value for flare detection and its length
shows the valid observation time, the gaps are due to the spacecraft data
down-link.

##  3 Magnetic features and flare parameters

We follow the definition of the magnetic parameters and flare indexes in paper
I. Here, for ease of reference, we review them briefly. From the light curve
modulation, it is possible to evaluate stability of the magnetic features;
long lived magnetic structures cause stable variation shape of the light
curve. Autocorrelation index $i_{\rm AC}$ estimates this similarity on the
light curve, which is defined for an observed time series with N data points
$\\{X_{t},t=0,1,\ldots,N-1\\}$ as:

$\rho(h)=\frac{\sum_{t=0}^{N-1-h}(X_{t+h}-\overline{X})(X_{t}-\overline{X})}{\sum_{t=0}^{N-1}(X_{t}-\overline{X})^{2}},\qquad
0\leqslant h\leqslant N-1,$ (1) $i_{\rm
AC}=\frac{2}{N}\int_{0}^{N/2}|\rho(h)|dh,$ (2)

Where $\rho(h)$ is auto-correlation coefficient at the time lag h,
$\overline{X}$ is the mean value of $X_{t}$, and N/2 in the integration limits
is the largest possible value that permits the entire light curve to be
included in the calculations. As in paper I, only the stars with rotation
period shorter than 45 days are selected, because the length of each quarter
is 90 days and the light curve of longer period stars could not be cross-
correlated with itself and $i_{\rm AC}$ does not yield the correct value (He
et al., 2018) .

The next magnetic parameter is effective range of light-curve variation
($R_{eff}$) which reflects the relative coverage and contrast of the magnetic
structures on the stellar surface. For $X_{t}$ time series, $R_{eff}$ is
calculated as below:

$.x_{t}=\frac{X_{t}-\widetilde{X}}{\widetilde{X}},\qquad t=0,1,\ldots,N-1,$
(3) $R_{\rm eff}=2\sqrt{2}\cdot x_{\rm
rms}\cdot[{1-(\frac{T_{spot}}{T_{phot}})^{4}}]=2\sqrt{2}\cdot\sqrt{\frac{1}{N}\sum_{t=0}^{N-1}x_{t}^{2}}\cdot[{1-(\frac{T_{spot}}{T_{phot}})^{4}}]$
(4)

where $T_{phot}$ and $T_{spot}$ are the temperature of the photosphere and the
spot, respectively. We estimate the spot temperature $T_{spot}$ from the
figure 7 of Berdyugina (2005) and we use $T_{eff}$ from the Kepler input
catalog to approximate $T_{phot}$. First term in equation 4 represents
relative coverage of the magnetic features and second term evaluates their
contrast or level of darkness which depends on the temperature difference
between stellar spots and the surrounding photosphere. Please note that we
compute $i_{\rm AC}$ and $R_{eff}$ from the normalized gradual component
$f_{G}$.

Furthermore, we define three parameters to evaluate the flare characteristics
quantitatively. The first one is time occupation ratio of flares ($R_{\rm
flare}$) which is defined as the ratio of occupied time by flares ($t_{\rm
flare}$) to the observation time ($t_{\rm obs}$);

$R_{\rm flare}=t_{\rm flare}/t_{\rm obs}$ (5)

$R_{\rm flare}$ is a measure of the flares occurrence frequency and takes
higher value when the star produces flares more often.

In order to calculate the second flare index, total power ($P_{\rm flare}$),
first we should estimate the total energy released by all identified flares
($U_{\rm flare}$):

$U_{\rm flare}=\int_{\rm flare}L_{\rm flare}(t)~{}dt~{}$ (6)

where L is the bolometric flare luminosity,

$L_{\rm flare}=\sigma_{\rm SB}T_{\rm flare}^{4}A_{\rm flare}~{}$ (7)

In equation 7, $\sigma_{SB}$ is the Stefan–Boltzmann constant, $A_{\rm flare}$
is the flare area and $T_{flare}$ is the flare temperature, which we assume to
be 9000 K as its black body temperature (Hawley & Fisher, 1992; Kretzschmar,
2011). Finally the total power of flares can be calculated as:

$P_{\rm flare}=U_{\rm flare}/t_{\rm obs}$ (8)

The last flare index is the averaged flux magnitude of flares ($M_{\rm
flare}$), that is the ratio of the total energy produced by all of flares to
the flare time,

$M_{\rm flare}=\frac{1}{t_{\rm flare}}\int L_{\rm flare}(t)dt=U_{\rm
flare}/t_{\rm flare}$ (9)

To better understand the mentioned magnetic proxies and flare indexes, we have
shown the light curves of two Kepler targets in figure1 and their value of
parameters in the first two rows of table1. Panel (a) of figure 1 shows the
light curve of KIC 6292732 which is a less active star in comparison with KIC
11957046 depicted in panel (b). The range of light curve variation in panel
(a) of figure 1 is much lower than panel (b) and as a result, the value of
$R_{eff}$ for KIC 6292732 is approximately 10 times less than KIC 11957046.
Furthermore, the number and height of the flare spikes in panel (a) is less
than panel (b), so the flare frequency, power and magnitude of KIC 6292732 is
lower than KIC 11957046.

Table 1: Prarameters of Kepler subgiant flare stars. This table is available in its entirety (352 stars) and machine-readable form in the online journal.  KIC |  |  $T_{\rm eff}$11From the Kepler Input Catalog (Huber et al., 2014; Huber, 2014). |  $P_{\rm rot}$22From the rotation period catalog derived by McQuillan et al. (2014). | $i_{\rm AC}$ | $R_{\rm eff}$ | $R_{\rm flare}$ | $P_{\rm flare}$ | $M_{\rm flare}$ | Thr33Threshold value of flare detection on the normalized flare component, see paper I. |  $N_{\rm f}$44Number of flares. |  |
---|---|---|---|---|---|---|---|---|---|---|---|---
|  | (k) | (day) |  | $(10^{-2})$ | $(10^{-2})$ | $(10^{22})$ | $(10^{24})$ | $(10^{-2})$ |  |  |
6292732**The light curve of this target is shown in panel (a) of Fig.1. |  | 5861 | 11.25 | 0.350 | 0.503 | 0.307 | 0.162 | 0.615 | 0.057 | 163 |  |
11957046**** The light curve of this target is shown in panel (b) of Fig.1. |  | 5855 | 5.95 | 0.359 | 5.013 | 2.206 | 3.287 | 1.733 | 0.191 | 465 |  |
1995351 |  | 5627 | 3.268 | 0.232 | 1.119 | 0.638 | 0.141 | 0.238 | 0.062 | 233 |  |
2018631 |  | 6221 | 4.268 | 0.268 | 0.018 | 0.187 | 0.070 | 0.364 | 0.027 | 102 |  |
2158047 |  | 5288 | 5.424 | 0.261 | 1.122 | 0.765 | 0.207 | 0.283 | 0.086 | 285 |  |
2158750 |  | 6131 | 7.777 | 0.264 | 0.091 | 0.498 | 0.324 | 0.722 | 0.056 | 217 |  |
2168263 |  | 6276 | 9.029 | 0.369 | 0.445 | 0.416 | 0.473 | 1.187 | 0.129 | 172 |  |
2308980 |  | 5757 | 15.712 | 0.269 | 0.203 | 0.215 | 0.111 | 0.519 | 0.085 | 106 |  |
2446436 |  | 6063 | 0.803 | 0.282 | 0.719 | 0.349 | 0.333 | 1.121 | 0.068 | 145 |  |
2712904 |  | 6231 | 2.522 | 0.266 | 0.892 | 0.270 | 0.293 | 1.172 | 0.139 | 118 |  |
2719755 |  | 6058 | 3.895 | 0.269 | 1.116 | 0.783 | 0.669 | 1.298 | 0.061 | 312 |  |

##  4 Results

Magnetic parameters and flare indexes are calculated from the Q2-Q16 Kepler
light curves for the 352 subgiants with spectral types F, G and K and their
mean values over the 15 quarters are given in table 1. Since there are no
published calculation of the Rossby number or convective turnover time for the
SGB, like the one computed by Wright et al. (2011) for the MS, we replace the
Rossby number with the quantity ${P^{-2}R^{-4}}$ which was proposed by Reiners
et al. (2014). This quantity produces the minimum scatter of X-ray emission
plots and can be an optimal alternative to the Rossby number. Furthermore, the
role of rotation rate in driving dynamo is more important and more proven than
the size or radius of the stars (Reiners et al., 2014). Owing to this fact, in
our analysis we emphasize mostly on rotation period rather than the radius.

Our goal is to compare the results of our analysis for the SGB with the MS in
paper I. However, in paper I magnetic activity indicators were plotted versus
Rossby number. Hence, we reproduce one of its figures versus ${P^{-2}R^{-4}}$
as an example to show that there is no big difference and we can do the
comparison with confidence. Figure 2 is the reproduction of figure 2 in paper
I, which displays autocorrelation index $i_{\rm AC}$ as a function of
${P^{-2}R^{-4}}$. The general behavior of both figures is similar and the very
small details are negligible.

Since less massive and cooler K and M dwarfs spend more time on the main-
sequence (Schwarzschild, 1958; Kippenhahn&Weigert, 1990; Hurley et al., 2000),
most of them have not reached to the SGB. So, in spite of the MS sample in the
paper I which contains four spectral types (F, G, K and M), our sample of
subgiants consists mostly of more massive G and F type with few K-type stars.
Therefore, statistical conclusion is impossible for K-type stars. But, we keep
them for qualitative interpretation. Also the spectral classification has been
done using the same temperature criteria described in paper I.

We estimate the error of the computed parameters using the formulas in the
appendix of He et al. (2018) and apply the error propagation formula for
additional terms. We show only the error bars of a small number of points as a
representative in order to avoid cluttering the figures.

Figure 2: Auto correlation index ($i_{AC}$) versus $P^{-2}R^{-4}$ for the main
sequence stars (reproduction of figure 2 in paper I). The four panels
correspond to the four spectral types of stars: M-type stars (top left, red),
K-type stars (top right, yellow), G-type stars (bottom left, green) and F-type
stars (bottom right, blue).

Table 2: Magnetic parameters and flare indexes for the MS and SGB in each spectral type (break) |  | $i_{\rm AC}$ |  | $R_{\rm eff}$ |  | $R_{\rm flare}$ |  | $P_{\rm flare}$ |  | $M_{\rm flare}$ |  | period (days)
---|---|---|---|---|---|---|---|---|---|---|---|---
|  |  |  |  |  |  | $(10^{-2})$ |  |  |  | $(10^{-2})$ |  |  |  | $(10^{22})$ |  |  |  | $(10^{24})$ |  |  |  |  |
|  | F | G | K |  | F | G | K |  | F | G | K |  | F | G | K |  | F | G | K |  | F | G | K
Main Sequence11The average value of parameters for the Main sequence stars is computed from the table.1 of Goodarzi et al. (2019). |  | 0.243 | 0.290 | 0.315 |  | 0.63 | 1.33 | 1.43 |  | 0.40 | 0.60 | 0.76 |  | 0.258 | 0.604 | 0.606 |  | 0.801 | 0.996 | 0.861 |  |  | 9.03 | 13.39
Sub-Giant |  | 0.273 | 0.310 | 0.345 |  | 0.75 | 2.06 | 3.74 |  | 0.47 | 0.90 | 1.24 |  | 0.671 | 1.435 | 2.082 |  | 1.178 | 1.532 | 2.241 |  |  | 6.22 | 10.34

###  4.1 Comparison with the main-sequence stars

For general comparison between the magnetic activity of the MS stars which was
reported in paper I and the SGB stars that are discussed in this paper, the
average values of the magnetic parameters and flare indexes for these two
evolutionary states are given in table 2. In order to avoid the effect of
different sample selection in the MS and SGB (lack of M-type stars and low
number of K-type stars in the SGB sample), we present this table with spectral
type classification.

From table 2 it can be seen that the autocorrelation index of the SGB is
approximately the same as the MS. However, effective range of light curve
fluctuations increases considerably; $R_{eff}$ is higher in the SGB than the
MS for the three spectral types. The increase of the relative coverage and
contrast of the magnetic features in the SGB is due to the deepening of the
convective zone (Van Saders et al., 2019) which increases the production of
magnetic field (Jenkins et al., 2011). From production of more magnetic field,
we expect more stable magnetic structures (Hall & Henry, 1994). However,
autocorrelation index of the SGB is not influenced by this fact, because more
vigorous convective turbulence probably cause to decay of star spots and
annihilate the effect of increased lifetime resulted from their stronger
magnetic field.

It can also be seen from table 2 that the time occupation ratio ($R_{flare}$),
total power ($P_{flare}$) and averaged flux magnitude of flares ($M_{flare}$)
in SGB are higher than in the MS. The average rotation period of MS sample in
paper I is 10.07 days and in the SGB sample is 6.06 days. The reason for the
lower average rotation period in the SGB is the existence of hot earlier type
stars with faster rotation in this sample (García et al., 2014). In other
words, the increase of the stellar moment of inertia in the SGB results in
only moderate spin-down of the stars (Gilliland, 1985). On the other hand, SGB
stars have deeper convective envelopes in comparison with the MS stars (Van
Saders & Pinsonneault, 2013). So, the Rossby number $Ro=P_{rot}$/$\tau_{conv}$
(where $P_{rot}$ is the rotation period and $\tau_{conv}$ is the convective
turnover time) decreases and cause to more vigorous magnetic field production.
This causes to higher values of accumulated magnetic energy on one hand and
the increase of the possibility of re-connection on the other hand. Therefore,
we see grater values of magnetic activity indicators such as relative coverage
and contrast of the magnetic structures and also frequency, total power and
magnitude of flares.

Simon & Drake (1989) analyzed ultraviolet observations of the late-type
subgiants and concluded that the activity of low-mass stars with M $<$ 1.25
$M_{\odot}$ do not show any large increase or decrease once they leave the
main sequence; however in stars with M $>$ 1.25 $M_{\odot}$, the UV emission
declines when the star evolves to the SGB. This is inconsistent with our
results in which the magnetic activity indicators increase for our SGB sample
with mass range of 0.8 $M_{\odot}$ $<$M $<$1.25 $M_{\odot}$. Furthermore,
using the stellar evolution codes and the Ca II emission lines associated with
the chromospheric activity, Gilliland (1985) concluded that in the evolution
path of the stars that are slightly more massive than the sun, the increase of
the convective turnover time and the subsequent decrease of Rossby number is
more important than the increase of moment of inertia, thus magnetic activity
enhances strongly with age.

###  4.2 Magnetic features stability, coverage and contrast in subgiants

Panel (a) and (b) of figure 3 displays autocorrelation index $i_{AC}$ and
effective range of light curve variations $R_{eff}$ as a function of
${P^{-2}R^{-4}}$ in logarithmic scale for three spectral types. As discussed
before, $i_{AC}$ reflects magnetic feature stability and $R_{eff}$ evaluate
relative coverage of the magnetic structures on the stellar surface together
with their contrast.We show the horizontal axis inversely so that, as in the
paper I, the movement in the right direction corresponds to an increase in the
rotation period of the stars.

Figure 3: Autocorrelation index $i_{AC}$ (panel a, left) and effective range
of light curve variation $R_{eff}$ (panel b, right) as a function of
${P^{-2}R^{-4}}$ in logarithmic scale for the SGB. Colors indicate spectral
types of the stars. Figure 4: Auto correlation index ($i_{AC}$) versus
effective range of light curve variations ($R_{eff}$). Colors indicate
spectral type of the stars.

Both panels of figure 3 indicate that there is no obvious dependency to
${P^{-2}R^{-4}}$ quantity in the SGB; neither $i_{AC}$ nor $R_{eff}$ has a
dominant increase or decrease. This is the opposite of what we observed in the
MS sample (see figure 2 and 3 of the paper I) in which the magnetic feature
stability, coverage and contrast of G-, K-, M-type stars increase with
decreasing Rossby number until reaching to saturation level; however F-type
stars do not show such dependency. Here, for the subgiants, even G-type stars
magnetic proxies do not show saturation behavior. It means that, in spite of
what we expect from dynamo mechanism, magnetic feature stability, coverage and
contrast are an independent parameters of rotation rate in the SGB. So, in
this evolutionary state of the stars, faster rotation does not necessarily
produce more stable and stronger magnetic fields.

In figure 4 we plot the autocorrelation index as a function of the effective
range of light curve variation. Stability of the magnetic features increase by
increasing their relative coverage and contrast, however the slope of this
increment is less than the MS stars; gray dashed line shows linear least
squares fit for SGB stars, which has smaller slope (0.034) in comparison with
the main sequence stars (0.058). As vigor of convection is higher in the SGB
than in the MS, magnetic feature stability is probably affected by this fact
and less influenced by the size and contrast of the magnetic structures.

###  4.3 Flare Indexes of Subgiant Stars

####  4.3.1 Time Occupation Ratio of Flares

In figure 5 we plot the time occupation ratio of flares versus logarithm of
${P^{-2}R^{-4}}$ for three spectral types. It can be seen that unlike the MS
(see figure 5 of paper I), $R_{\rm flare}$ does not have a dominant increase
or decrease behavior in the SGB and instead is scattered everywhere. This
means that the variation of the flare rate in the SGB is not affected very
much by the rotation period and the size of the stars.

The level of chromospheric activity and its relation with the Rossby number
was studied in a sample of 121 single stars from the SGB by do Nascimento et
al. (2003). They found that only in stars with $B-V<0.55$ (see their figure 7)
there is no dependency of CaII emission flux to the Rossby number and in the
rest (stars with $B-V>0.55$) chromospheric activity increases by decreasing
Rossby number. However, it should be noted that they computed convective
turnover time of the SGB stars from the MS relation in Noyes et al. (1984)
that is not very accurate due to the deepening of the convective envelope on
the SGB. In our analysis, which most of the stars have $0.4<B-V<0.8$, none of
the magnetic activity indicators show dependence on the ${P^{-2}R^{-4}}$
parameter (please see also sections 4.3.2 and 4.3.3).

Figure 5: Time occupation ratio of flares ($R_{\rm flare}$) versus logarithm
of ${P^{-2}R^{-4}}$ for different spectral types.

Figure 6 displays $R_{\rm flare}$ versus autocorrelation index (panel a, left)
and versus effective range of light curve fluctuations (panel b, right). Like
the main sequence stars (see figure 6 of paper I), there is no strict increase
of flare frequency with magnetic feature stability. However, the relative
coverage and contrast of the magnetic structures plays more important role and
$R_{\rm flare}$ increases clearly with increasing $R_{eff}$. When the coverage
of magnetic features increases on the stellar surface, the possibility of
reconnection and its consequent flare event increases.

Figure 6: Logarithm of time occupation ratio of flare ($R_{\rm flare}$) versus
autocorrelation index $i_{AC}$ (panel a, left) and versus effective range of
light curve fluctuations $R_{eff}$ (panel b, right) for different spectral
types that are indicated by colors.

####  4.3.2 Total power of flares

As defined in section 3, $P_{\rm flare}$ gives an evaluation of the total
power produced by all diagnosed flares. Figure 7 is $P_{\rm flare}$ versus
logarithm of $P^{-2}R^{-4}$. Again, unlike the MS stars, no rotational
velocity relationship could be recognized from these three spectral types. It
can be concluded that dynamo procedure works with different mechanisms when
the stars evolve to the SGB, in which there is not strict rotation rate
dependency and saturation regime; possibly due to the deepening of the
convective zone and magnetic field production, which is already in its maximum
level and does not increase further when rotation rate increases.

Panel (a) and (b) of figure 8 show the total power of flares versus $i_{AC}$
and $R_{eff}$, respectively. Panel (a) is more scattered than having trends,
but increase of $P_{\rm flare}$ with increase of $R_{eff}$ in panel (b) is
quite noticeable for all of the three spectral types. Since the magnetic
energy is proportional to the strength and volume of magnetic structures,
larger and darker stellar spots can store more magnetic energy inside
themselves (Notsu et al., 2013, 2019) and release it in flare events. This is
similar to what we saw for the MS stars in paper I.

Figure 7: Total power of flares ($P_{flare}$) versus the logarithm of
${P^{-2}R^{-4}}$ for different spectral types. Figure 8: Total power of flares
($P_{flare}$) vs. the autocorrelation index $i_{AC}$ (panel a, left) and vs.
the effective range of light-curve fluctuations $R_{eff}$ (panel b, right) for
subgiant stars from different spectral types.

####  4.3.3 Averaged Flux Magnitude of Flares

Figure 9: Averaged flux magnitude of flares ($M_{\rm flare}$) as a function
of: ${P^{-2}R^{-4}}$ (panel a), autocorrelation index $i_{AC}$ (panel b),
effective range of light curve fluctuations $R_{eff}$ (panel c) and time
occupation ratio of flares $R_{\rm flare}$ (panel d) for different spectral
types which are indicated by colors.

Figure 9 provides averaged flux magnitude of flares as a function of different
variables. Panel (a) shows $M_{\rm flare}$ versus the logarithm of
$P^{-2}R^{-4}$; there is a faint increase of $M_{\rm flare}$ towards the left
part of the panel which corresponds to the shorter rotation period, i.e.,
stars that have faster rotation can produce flares with higher magnitude. This
is the same as what we observed for the MS in paper I.

Panel (b) of figure 9 displays $M_{\rm flare}$ as a function of
autocorrelation index. Averaged flux magnitude of flares at higher value of
$i_{AC}$ increases slightly, because more durable magnetic structures are
likely to store more magnetic energy within themselves.

In panel (c) of figure 9 we see averaged flux magnitude of flares versus
effective range of light curve fluctuations which increase clearly with
increasing $R_{eff}$. Especially beyond $log(R_{eff}$)= -2.0, the slope of
scatter plot increases suddenly, and panel (b) of figures 6 and 8 show the
same behavior. This threshold value of $R_{eff}$ has already been seen in the
MS stars (see figures 6, 8, and 9 of paper I), and implies that when the
relative coverage and contrast of the magnetic features exceeds a certain
limit, the frequency, power and magnitude of flares increase suddenly.

Finally, panel (d) of figure 9 is $M_{\rm flare}$ versus time occupation ratio
of flares. There is a weak trend of enhancement of flare magnitude with
increasing of $R_{\rm flare}$ suggesting that large flares are more likely to
occur in stars which produce flare more often.

Generally, the behavior of $M_{\rm flare}$ versus different variables for the
SGB stars is the same as for the MS stars. The only difference is the lack of
the M-type stars and small number of K-type stars; both of which have low
values of flux magnitude. In other words, the maximum flare magnitude on the
SGB is the same as the MS; but the minimum value is higher than the MS due to
the lack of late type stars.

###  4.4 The Amount of Convective Matter

It is suggested that in addition to the role of the rotation rate in
production of magnetic field, the amount of the convective matter may have
important effect. Pettersen (1989) considered this for the MS and concluded
that there is a good correspondence between flare luminosity of red dwarfs and
the volume of the convective zone. However, they did not found such a positive
relationship with the mass of the convective zone.

To do this sort of analysis, first we should compute the mass of the
convective zone $M_{\rm CZ}$ for the SGB. We used figure 8 of do Nascimento et
al. (2003) and the fit of it to extract the relationship between the relative
mass of the convective zone ($M_{\rm CZ}/M_{\rm star}$) and effective
temperature of the stars. For the temperature range of our sample, exponential
function can fit well to their data (figure 8 of do Nascimento et al. (2003)
and also figure 4 of do Nascimento et al. (2000)). Figure 10 shows the $M_{\rm
CZ}/M_{\rm star}$ ratio versus logarithm of effective temperature for our
targets. We use Figure 10 to plot the magnetic activity indicators as a
function of normalized mass of the convective zone in figure 11.
Autocorrelation index $i_{AC}$ , effective range of light curve fluctuations
$R_{eff}$, time occupation ratio of flares $R_{\rm flare}$ and total power of
flares $P_{\rm flare}$ have been plotted in panel (a), (b), (c) and (d) of
figure 11, respectively. Gray dashed lines are least squares linear fits to
the data. We do not show averaged flux magnitude of flares $M_{\rm flare}$ due
to its similarity to $P_{\rm flare}$. It can be seen that magnetic proxies and
flare indexes increase by increasing the relative mass of the convective zone.
In other words, when the convective zone includes a larger fraction of the
stellar mass, the ability of the star to produce magnetic field is higher. For
this reason, the stars from earlier types may have lower level of magnetic
activity. However, it should be noted that the stars with higher mass have
higher luminosity and the detection of flares and other magnetic structures is
more difficult. So, their level of magnetic activity may have been
underestimated especially in the band pass of the Kepler data that is more
sensitive for certain effective temperatures.

Figure 10: The relative mass of the convective zone ($M_{\rm CZ}/M_{\rm
star}$) versus logarithm of effective temperature for the SGB sample. Figure
11: Variation of: (a) autocorrelation index $i_{AC}$ , (b) effective range of
light curve fluctuations $R_{eff}$ , (c) time occupation ratio of flares
$R_{\rm flare}$ and (d) total power of flares $P_{\rm flare}$ versus relative
mass of the convective zone $M_{\rm CZ}/M_{\rm star}$ for different spectral
types that are indicated with colors.

###  4.5 Correlation Analysis

In order to make a comprehensive comparison, we also do the correlation
analysis for the SGB stars, as we did in paper I for the MS stars. The average
correlation values of the magnetic and flare parameters with each other
between quarters 2-16 are given in table 3. Among the nine correlation pairs,
only three of them are nonzero.

The first one is correlation of $i_{\rm AC}$-$R_{\rm eff}$ which is around
$\sim 0.5$ indicating that larger and darker magnetic structures live longer
on the stellar surface.

The second non-zero correlation value is related to $R_{\rm flare}$-$P_{\rm
flare}$ and has positive value; which is obvious because the higher rate of
flare frequency, the higher value of total power. The only point is that the
correlation value is higher in earlier type stars, for example, the
correlation value of F-type stars is four times that of K-type stars. One
possible explanation is that in hotter stars, spots are more contrast with
respect to the surrounding photosphere (Berdyugina, 2005) and therefore have
stronger magnetic field, this cause a higher power output of magnetic energy
when the flare rate increases.

The last non-zero correlation value belongs to $R_{\rm flare}$-$M_{\rm
flare}$, which is negative and has a lower value in the late type stars. This
indicates that the flare rate and magnitude are anti-correlated. In other
words, a higher number of flares releases energy more regularly and prevents
magnetic energy accumulation and the production of large flares. Conversely,
large flares are more likely to occur when the number of flares is low.

The general conclusion for correlation analysis of the SGB is the same as the
MS. This suggests that all of the governing relations between the magnetic
parameters and flares indexes in the MS stars also apply to the subgiant
branch.

Table 3: Average correlation values for pairs of parameters between quarter 2-16 of each spectral type.  |  |  $i_{\rm AC}$-$R_{\rm eff}$ |  $i_{\rm AC}$-$R_{\rm flare}$ |  $i_{\rm AC}$-$P_{\rm flare}$ |  $i_{\rm AC}$-$M_{\rm flare}$ |  $R_{\rm eff}$-$R_{\rm flare}$ |  $R_{\rm eff}$-$P_{\rm flare}$ |  $R_{\rm eff}$-$M_{\rm flare}$ |  $R_{\rm flare}$-$P_{\rm flare}$ |  $R_{\rm flare}$-$M_{\rm flare}$ |
---|---|---|---|---|---|---|---|---|---|---|---
K-type |  | 0.5094 | 0.1412 | -0.0658 | -0.1485 | 0.0905 | 0.0163 | -0.0164 | 0.1182 | -0.4564 |
G-type |  | 0.5033 | 0.0195 | 0.0349 | 0.0130 | 0.0909 | 0.1213 | 0.0493 | 0.3835 | -0.3329 |
F-type |  | 0.4831 | -0.0395 | 0.0053 | 0.0465 | 0.0362 | 0.0779 | 0.0674 | 0.4961 | -0.2481 |

##  5 Conclusion

In this paper, we studied magnetic activity and flare characteristics of the
subgiant stars with spectral type F, G and K and compared the results with the
main-sequence stars which were analyzed in paper I. The main result of this
analysis is the non-dependency of the magnetic proxies and flare indexes
versus $P^{-2}R^{-4}$ (alternative to the Rossby number) for the F and G-type
subgiants. It means that the rotation rate and size of the stars do no have
important effect on the amount of generated magnetic field in dynamo process.
This is the opposite of what has been seen for the MS, in which magnetic
activity of the G, K and M-type stars have clear dependency to the Rossby
number and obey saturation behavior (see paper I and also Yang&Liu (2019)).
There are no M-type stars on the subgiant branch, and due to the small number
of K-type stars, a general conclusion about them is not possible.

However, the positive relation between the stability of the magnetic features
and their relative coverage and contrast holds true on the SGB (though with a
lower graph slope in comparison with the MS, see figure 4), bigger and more
contrast magnetic structures live longer on the stellar surface.

Also the relationship between the relative coverage and contrast of the
magnetic features with flare frequency and total power (see panel b of figure
6 and 8) in the SGB is the same as the MS. Darker and bigger magnetic features
produce more flares with higher total power. This positive relationship is
even grater around $log(R_{eff})=-2.0$ which is the critical value for all of
the flare proxies in the main-sequence and subgiant branch. Beyond this value,
flare rate, total power and magnitude increase with a larger slope. It means
that when the coverage and contrast of the magnetic features exceeds a certain
threshold, the probability of reconnection as well as the amount of
accumulated magnetic energy increase significantly.

Magnetic proxies and flare indexes increase by increasing the relative mass of
the convective zone $M_{\rm CZ}/M_{\rm star}$. So, when a higher fraction of
the stellar mass is convective, the stars produce more magnetic field through
dynamo process, and therefore magnetic activity indicators get larger.

The correlation values of parameter pairs and their variation are the same as
the MS, so the governing relation between the magnetic structures and flare
events are still valid when the stars leave the MS. We obtained three main
results from the correlation analysis. First, larger and darker magnetic
structures live longer on the stellar surface. Second, contrary to what we
expected, the coverage and contrast of the magnetic structures is poorly
correlated with the flare rate. This shows that the magnetic structures which
produce the prevailing light curve variations are not simultaneous with the
flare events. The last result is that flare frequency is anti-correlated with
the flare magnitude, because frequent release of magnetic energy prevents
excessive accumulation and hence the large flare magnitude.

The detail study of star’s magnetic field behavior and its discrepancy between
the MS and SGB may help future researches about the mechanism of magnetic
field production either in the convection zone or at the interface with the
radiative core. Also statistical analysis of the flare characteristics in
different evolutionary state of the stars would guide investigation of the
magnetic reconnection and the consequent flare events. Using more accurate and
broad data provided by the recent missions will deepen our insight on the
magnetic activity of the stars and its impact on the habitable condition of
the nearby planets.

We thank the anonymous referee for useful and constructive comments. This
paper includes data collected by the Kepler mission. Funding for the _Kepler_
mission is provided by the NASA Science Mission directorate. The _Kepler_ data
presented in this paper (_Kepler_ Data Release 25) were obtained from the
Mikulski Archive for Space Telescopes (MAST).

## References

  * Adams et al. (1935) Adams, W. S., Joy, A. H., Humason, M. L.& Brayton, A. M. 1935, ApJ, 81, 187
  * Ayres&Linsky (1980) Ayres, T. R. & Linsky, J. L. 1980, ApJ, 241, 279
  * Ayres et al. (1995) Ayres, T. R., Fleming, T. A., Simon, T., et al. 1995, ApJS, 96, 223
  * Basri et al. (2010) Basri, G., Walkowicz, L. M., Batalha, N., et al. 2010, ApJ, 713, Issue 2, L155
  * Basri et al. (2011) Basri, G., Walkowicz, L. M., Batalha, N., et al. 2011, AJ, 141, Issue 1, 20
  * Bastien et al. (2014) Bastien, F. A., Stassun, K. G. & Pepper, J. 2014, ApJ, 788, L9
  * Berdyugina (2005) Berdyugina, S. V. 2005, Living Reviews in Sol. Phys., 2, 8
  * Benz & Güdel (2010) Benz,A. O., Güdel, M. 2010, A&A, 48, 241
  * Berger et al. (2018) Berger, T. A., Huber, D., Gaidos, E., van Saders, J. L. 2018, ApJ, 866, 99
  * Borucki et al. (2010) Borucki, W. J., Koch, D., Basri, G., et al. 2010, Science, 327, 977
  * Chaplin et al. (2011) Chaplin, W. J., Bedding, T. R., Bonanno, A. et al. 2011, ApJ, 732, Issue 1, L5
  * Dalgarno & Black (1976) Dalgarno, A., Black, J. H. 1976, Rep. Prog. Phys., 39, Issue 6, 573
  * Davenport (2016) Davenport, J. R. A. 2016, ApJ, 829:23
  * Dempsey et al. (1993) Dempsey, R. C., Linsky, J. L., Fleming, T. A., Schmitt, J. H. M. M. 1993, ApJS, 86, 599
  * do Nascimento et al. (2000) do Nascimento, J. D. J., Charbonnel, C., Lèbre, A., de Laverny, P., De Medeiros, J. R. 2000, A&A, 357, 931
  * do Nascimento et al. (2003) do Nascimento J. D. J., Canto Martins B. L., Melo C. H. F., Porto de Mello G., De Medeiros J. R., 2003, A&A, 405, 723
  * Fekel&Balachandran (1993) Fekel, F. C. & Balachandran, S. 1993, ApJ, 403, 708
  * Frasca et al. (2011) Frasca, A., Fröhlich, H. E., Bonanno, A., et al. 2011, A&A, 532, A81
  * Galloway&Weiss (1981) Galloway, D. J., Weiss, N. O. 1981, ApJ, 243, 945
  * García-Alvarez et al. (2006) García-Alvarez, D., Drake, J. J., Ball, B., Lin, L., Kashyap, V. L., 2006, ApJ, 638, Issue 2, 1028
  * García et al. (2014) García, R. A., Ceillier, T., Salabert, D. , et al. 2014, A&A,572, A34
  * Glatzmaier (1984) Glatzmaier, G. A. 1984, Journal of Computational Physics (ISSN 0021-9991), 55, 461
  * Gilman (1983) Gilman, P. A., 1983, ApJS, 53, 243-268.
  * Gilliland (1985) Gilliland, R. L. 1985a, ApJ, 299,286.
  * Goodarzi et al. (2019) Goodarzi, H., Mehrabi, A., Khosroshahi, H. G., He, H. 2019, ApJS, 244, 37
  * Gray (1989) Gray, D. F. 1989, 347, p.1021
  * Haisch&Simon (1982) Haisch, B. M.& Simon, T. 1982, ApJ, 263, 252
  * Hall & Henry (1994) Hall, D. S., Henry, G.W., 1994, “The Law of Starspot Lifetimes”, IAPPP Commun., 55, 51–57
  * Hawley & Fisher (1992) Hawley, S., Fisher, G. 1992, ApJS, 78, 565
  * Hawley et al. (2014) Hawley, S., Davenport, J. R. A., Kowalski, A. F., Wisniewsi, J. P. 2014, ApJ, 797, 121
  * He et al. (2015) He, H., Wang, H., Yun, D. 2015, ApJS, 221, 18
  * He et al. (2018) He, H., Wang, H. , Zhang, M., Mehrabi, A., et al. 2018, ApJS, 236, 7
  * Herbst & Klemperer (1973) Herbst, E., Klemperer, W. 1973, ApJ, 185, 505
  * Herbst & van Dishoeck (2009) Herbst, E., van Dishoeck, E. F. 2009, ARA&A, 47, Issue 1, 427
  * Hoyle (1960) Hoyle, F. 1960, Quarterly Journal of the Royal Astronomical Society, Vol. 1, p.28
  * Huber et al. (2011) Huber, D., Bedding, T. R., Stello, D., et al. 2011, ApJ, 743, Issue 2, 143
  * Huber (2014) Huber, D. 2014, Kepler Stellar Properties Catalog Update for Q1-Q17 Transit Search (KSCI-19083), https://exoplanetarchive.ipac.caltech.edu/docs/KeplerStellar_Q1_17_documentation.pdf
  * Huber et al. (2014) Huber, D., Silva Aguirre, V., Matthews, J. M., et al. 2014, ApJS, 211, 2
  * Hurley et al. (2000) Hurley, J. R., Pols, O. R., Tout, C. A., 2000, MNRAS, 315, Issue 3, 543
  * Jenkins et al. (2011) Jenkins, J. S., Murgas, F., Rojo, P., et al., 2011, A&A, 531, A8
  * Judge (1986) Judge, P. G. 1986, MNRAS, 221, 119
  * Katsova et al. (2018) Katsova, M. M., Kitchatinov, L. L., Moss, D. 2018, Astronomy Reports, 62, 8
  * Kippenhahn&Weigert (1990) Kippenhahn, R. & Weigert, A. 1990, Stellar Structure and Evolution, XVI, 468 pp. 192 figs.. Springer-Verlag Berlin Heidelberg New York. Also Astronomy and Astrophysics Library
  * Koch et al. (2010) Koch, D. G., Borucki, W. J., Basri, G., et al. 2010, ApJ, 713, L79
  * Kretzschmar (2011) Kretzschmar, M. 2011, A&A, 530, 84
  * Kurtz et al. (2011) Kurtz, D. W., Cunha, M. S., Saio, H., et al. 2011, MNRAS, 414, Issue 3, 2550
  * Lambert&Ries (1981) Lambert, D. L. & Ries, L. M. 1981, ApJ, 248, 228
  * Mangeney&Praderie (1984) Mangeney, A. & Praderie, F., 1984, A&A, 130, 143
  * McQuillan et al. (2014) McQuillan, A., Mazeh, T., Aigrain, S. 2014, ApJS, 211, 24
  * Mehrabi et al. (2017) Mehrabi, A., He, H. , Khosroshahi, H. 2017, ApJ, 834, 207
  * Middelkoop&Zwaan (1981) Middelkoop, F. & Zwaan, C. 1981, A&A, 101, 26
  * Middelkoop (1982) Middelkoop, F. 1982, A&A, 107, 31
  * Moffatt (1978) Moffatt, H. K. 1978, Cambridge Monographs on Mechanics and Applied Mathematics, Cambridge: University Press
  * Notsu et al. (2013) Notsu, Y., Shibayama, T., Maehara, H., et al. 2013, ApJ, 771, 127
  * Notsu et al. (2019) Notsu, Y., Maehara, H., Honda, S. et al. 2019, ApJ, 876, 1
  * Noyes et al. (1984) Noyes, R. W., Hartmann, L. W., Baliunas, S. L, et al. 1984, ApJ, 279, 763
  * Parker (1955) Parker, E. N. 1955, ApJ, 122, p.293
  * Parker (1970) Parker, E. N. 1970, ARA&A, 8,1
  * Pettersen (1989) Pettersen, B.R., 1989, Sol. Phys., 121, 299
  * Reiners et al. (2009) Reiners, A., Basri, G., Browning, M. 2009, ApJ, 692, 538
  * Reiners et al. (2014) Reiners, A., Schüssler, M., Passegger, V. M. 2014, ApJ, 794, 144
  * Sandage et al. (2003) Sandage, A., Lubin, L. M., VandenBerg, D. A. 2003, The Publications of the Astronomical Society of the Pacific, 115, Issue 812, 1187
  * Sandage et al. (2016) Sandage A., Beaton R. L., Majewski , S. R. 2016, Publications of the Astronomical Society of the Pacific, 128:064202, doi:10.1088/1538-3873/128/964/064202
  * Schatzman (1962) Schatzman, E. 1962, Annales d’Astrophysique, 25, 18
  * Schrijver & Pols (1993) Schrijver, C. J. & Pols, O. R. 1993, A&A, 278, 51
  * Schwarzschild (1958) Schwarzschild, M. 1958, Princeton, Princeton University Press
  * Shibayama et al. (2013) Shibayama, T., Maehara, H., Notsu, S., et al. 2013, ApJS., 209, 5
  * Simon & Drake (1989) Simon, Th., Drake, S., 1989, ApJ, 346, 303
  * Simon et al. (1985) Simon, T.; Herbig, G.; Boesgaard, A. M. 1985, ApJ, 293, 551
  * Spruit (2002) Spruit, H. C. 2002, A&A, 381, 923
  * Steenbeck & Krause (1969) Steenbeck, M., Krause, F. 1969, Astron. Nachrichten , 291, 49
  * Strömberg (1930) Strömberg, G. 1930, ApJ, 71, 175
  * Vaughan et al. (1981) Vaughan, A. H., Baliunas, S. L., Middelkoop, F., et al. 1981, ApJ, 250, 276
  * Van Doorsselaere et al. (2017) Van Doorsselaere, T., Shariati, H., Debosscher, J. 2017, ApJS, 232, 26
  * Van Saders & Pinsonneault (2013) Van Saders, J. L., Pinsonneault, M. H., 2013, ApJ, 776, 67
  * Van Saders et al. (2019) Van Saders, J. L., Pinsonneault, M. H., Barbieri, M., 2019, ApJ, 872, 128
  * Vilhu (1984) Vilhu, O. 1984, A&A, 133, 117
  * Vilhu&Walter (1987) Vilhu, O., Walter, F. M. 1987, ApJ, 321, 958
  * Walkowicz et al. (2011) Walkowicz, L. M., Basri, G., Batalha, N., et al. 2011, AJ, 141, 50
  * Walter (1981) Walter, F. M. 1981, ApJ, 245, 677
  * Wilson (1976) Wilson, O. C. 1976, ApJ, 205, 823
  * Wright et al. (2011) Wright, N. J., Drake, J. J., Mamajek, E. E., Henry, G. W. 2011, ApJ, 743, 48
  * Yang&Liu (2019) Yang, H., Liu, J. 2019, ApJS, 241, 2
  * (84)


# Ethical Considerations Towards Protestware

Marc Cheong2, Raula Gaikovina Kula1, and Christoph Treude2
2University of Melbourne, Australia, 1Nara Institute of Science and
Technology, Japan
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

A key drawback to using a free and open source software (FOSS) third-party
library is the threat that it opens up a doorway to deliver malicious attacks.
In recent times, these threats have taken a new form, when the library
maintainers themselves turn their FOSS libraries into protestware. This is
defined as software containing political messages delivered through these
libraries, which can either be malicious or benign. Since developers readily
adopt these libraries into their software, much trust and responsibility are
placed on the maintainers to ensure that the library does what it promises to
do. This paper takes a look into the possible scenarios where developers might
consider turning their FOSS into protestware, using an ethico-philosophical
lens. Using different frameworks commonly used in AI ethics, we extend the
applications of the ethics of AI to the study of protestware, paying attention
to its multi-perspectival nature, involving stakeholders – or moral agents –
of varying degrees of involvement and participation, cognisant of the fact
that ethical reasoning is complex. Additionally, we illustrate how an open-
source maintainer’s decision to protest is influenced by different
stakeholders (viz., their membership in the FOSS community, their personal
views, financial motivations, social status, and moral viewpoints), making
protestware a multifaceted and intricate matter. We also explore potential
perspectives from the other stakeholders in the FOSS ecosystem, vis-à-vis the
negative and positive effects of protestware and consider their status as
moral agents in the community.

> “When people feel they are not being heard, they may resort to different
> measures to get their message across. In the case of programmers, they have
> the unique ability to protest through their code.”
>
> Kula & Treude (2022) [1]

> “Consequently, he found himself confronted by two very different modes of
> action; the one concrete, immediate, but directed towards only one
> individual; and the other an action addressed to an end infinitely greater…
> but for that very reason ambiguous… He had to choose between those two. What
> could help him to choose?”
>
> Sartre (1946)
> Existentialism Is a Humanism (trans.: Mairet) [2]

##  I Introduction

In this article, we articulate the motivations behind maintainers who turn
their free and open source software (FOSS) into protestware. There have been
cases of self-sabotage with apolitical angles, such as for one’s
personal111https://www.theregister.com/2016/03/23/npm_left_pad_chaos/,
economic222https://github.com/zloirock/core-js/issues/548, or
advertising333ttps://www.zdnet.com/article/popular-javascript-library-starts-
showing-ads-in-its-terminal/ gain. However, in this paper, we focus on
protestware, as it surpasses an individual’s needs, and becomes an ethical
issue that has larger societal ramifications. Protestware, especially in the
context of FOSS, creates such a shift from traditional forms of protest, into
the digital world that has the power to impact millions by ruining a single
piece of code. Although ethics in computing is not new, the phenomenon of
Protestware is unique, in that the power of responsibility is placed on
individuals (i.e., sometimes a single library maintainer).

In this work, we carefully examine Protestware under the lens of three ethical
frameworks (Duty, Consequentialism, and Principlism). For each framework, we
then explore the dilemmas that a library maintainer may face vis-à-vis the
other FOSS community members; and frame their actions from each lens, guided
by lessons in the extant field of applied ethics, drawing upon its modern use
in evaluating AI technologies and their humanistic impacts. We also discuss
potential guidelines and larger ethical implications for the open source,
industry, research, and education sectors, while bearing in mind the multi-
perspectival nature of ethical analysis which has both harmful and beneficial
implications.

##  II Background

###  II-A Context

In March 2022, the maintainer of node-
ipc,444https://github.com/RIAEvangelist/node-ipc a widely used software
library, intentionally introduced a vulnerability into their code. If the code
was run within Russia or Belarus, it would attempt to replace all files on the
user’s device with a heart
emoji.555https://techcrunch.com/2022/07/27/protestware-code-sabotage/ This
critical security flaw (i.e., CVE-2022-23812 [3]) highlights the trend of
programmers intentionally sabotaging their code for political purposes, a
practice known as “protestware” [1].

The malicious code was intended to overwrite arbitrary files depending upon
the geolocation of the user’s IP address: in essence, attacking software in
specific locations. Specifically, the affected versions 10.1.1 and 10.1.2 of
the library check whether the host machine has an IP address in Russia or
Belarus, and if so, overwrites every file it could with a heart symbol.
Version 10.1.3 was released soon after without this destructive functionality,
while Versions 10.1.1 and 10.1.2 were removed from the NPM registry.

Responses from the community varied, including frustrations that led to
insightful discussions. One example from a contributor on the GitHub
Discussions channel is shown below [4]:

> I’m very happy to see that the principles and character of many in tech
> (FOSS especially) remain clear enough to recognize how completely wrong this
> was. Of course, if the marketplace of current things keeps hammering away at
> this, it will benefit a small number of corporate giants (misplaced
> trust/safety). I hope we all start seeing these patterns as we grapple with
> a general blurring of lines between tools for marketing and weaponry. It’s
> essential to ask: what’s the outcome and who benefits? I like to ask the
> faux ideologues “who agrees with you?” “Isn’t it strange how well aligned
> you are with a small number of very visible, influential, and powerful
> organizations?” “What’s the fight and who is on which side, again?” It’s
> about competency, not power. Power feeds and is fueled by egocentrism
> (plainly, weak vanity). Competency comes from discovering your natural gifts
> and applying them. (sic.)

Another user from that GitHub Discussion explained how this affected the open
source community [4]:

> The trust factor of open source, which was based on goodwill of the
> developers is now practically gone, and now, more and more people are
> realizing that one day, their library/application can possibly be exploited
> to do/say whatever some random dev on the internet thought was ‘the right
> thing to do’. (sic.)

The maintainer in question defended his module on GitHub, saying that “this is
all public, documented, licensed and open source” [1]. Earlier, there were
more than 20 issues flagged against node-ipc about its behavior. Some of the
comments referred to the creation as “protestware, while others might call it
malware” [1].

We present another case where the protestware does not have malicious intent,
but aims at increasing awareness. The same maintainer of the node-ipc library
then created the peacenotwar
library.666https://github.com/RIAEvangelist/peacenotwar As explained by the
maintainer, it serves as a non-violent protest against Russia’s aggression.
Instead of malicious deletion of files, the module adds a message of peace on
users’ desktops [5]. The maintainer was quoted in the README file:

> I pledge that this module, to the best of my knowledge and skills, does not
> do any damage to anyone’s data. If you do not like what this module does,
> please just lock your dependencies to any of my work or other’s which
> includes this module, to a version you have code reviewed and deemed
> acceptable for your needs. Also, please code-review your other modules for
> vulnerabilities.

###  II-B Characterization

Protestware represents a paradigm shift from traditional forms of protest,
such as strikes or demonstrations. Programmers have the unique power to embed
their dissent directly within code. A small tweak to a widely-used software
application can spread a protest message globally at an unprecedented speed.
Whereas traditional protests usually need mass mobilisation to be effective, a
single individual can make a significant impact with protestware. Traditional
protests are typically confined to specific legal jurisdictions, but
protestware’s cross-border nature makes its legal status ambiguous.

The fundamental ethical principles and frameworks guiding activists remain
consistent across both protestware and traditional forms of protest. In this
paper, we discuss these principles and frameworks specifically in the context
of this emerging form of activism: protestware.

Protestware can take two forms (based on [1]):

malignant protestware

which intentionally damages or takes control of a user’s device without their
knowledge or consent; and

benign protestware

which raises awareness about a social or political issue without causing harm
(e.g., changes to license files777https://github.com/terraform-aws-
modules/terraform-aws-
ec2-instance/commit/6867788411a202b61187f9935e9eaa72a18f0bbe).

These two forms of protestware can manifest in various ways, such as project
documentation (e.g., README banner), communication (e.g., log messages),
environment (e.g., injected code on target machines), or output (e.g., file
deletions). In this study, we focus on protestware manifested in the
environment (i.e., manifested in the source code), which, even if benign,
tends to draw more attention of the user. Protestware can have a wide-ranging
impact on numerous stakeholders, including other contributors to the same
project, direct and indirect users of the project, and even the entire open-
source community and its newcomers.

On one hand, the rise of protestware raises the question of whether it is
ethical to intentionally worsen something to make a point. On the other hand,
protestware draws attention to current issues with the potential for social
change. This issue is particularly significant in software ecosystems where
code is frequently reused [6], as these ecosystems rely on the trust and
reliability of the code being used. If a programmer introduces protestware
into their code, it can introduce a ripple effect: compromising the security
and stability of the software for all users who reuse that code, potentially
affecting individuals and businesses that rely on the software, as well as
further dependencies.

###  II-C Protestware: Beyond Computing Ethics?

The literature for computing and AI ethics is rapidly growing, predominantly
on sociotechnical systems and “artificial moral agents” [7] such as
algorithmic recommender systems, self-driving cars, algorithmic policing and
law enforcement, and AI-based person recognition.

In the same way that ‘traditional’ AI ethics adapts and contextualises applied
ethics [7, 8] to AI systems, protestware ethics similarly extends
‘traditional’ AI ethics by recognizing the various stakeholders in the open
source ecosystem. For starters, AI ethics issues typically focus on major
actors such as technology providers or adopters [9]. What sets our proposed
analysis of protestware apart from existing computing ethics studies is that
the stakeholders involved have a more personal, direct, and explicit
involvement. To illustrate: consider a company (BigCorp) whose self-driving
car who has injured a pedestrian: it is hard to see which individual
programmer or engineer is responsible for the injury, based on the ‘diffusion’
of responsibility through BigCorp’s organisational structure.888 We recognise
that, in some instances, this ‘diffusion’ resembles collective actions such as
blackouts in protest of the 2012 Stop Online Piracy Act
(https://en.wikipedia.org/wiki/Protests_against_SOPA_and_PIPA). However, we
emphasise the dynamic nature of protestware in the FOSS ecosystem, which can
involve different levels of ‘diffusion’ and collective action, per se.
Contrast this with an individual volunteer (Violet), of an open source
software library, who exhibits a form of activism by adding a few lines of
code to prevent her software library from working in certain regions.

In order to think about new guidelines for deciding ethical actions and
consequences for Violet, we will need to briefly explore the landscape of
applied ethics.

##  III Ethics: A Primer

There exist various ethical theories, each with their own pros and cons [10],
which sometimes even conflict with each other in terms of their application
and evaluation. Ethics, simply put, is about doing the “right” things.
However, there is no clear answer to what makes things “right” or “moral”.
Enter applied ethics – the application of “one moral theory or [an]other …
upon the applied ethics problem at hand, in the hopes of producing a
resolution” [11].

The field of medicine was one of the forerunners of this (e.g., by asking,
Using common principles of medical ethics, how do we do no harm to patients
under our care?). This idea was quickly adapted into — and gained traction
within — research in AI and computing in recent years (e.g., by similarly
asking, How do self-driving cars do no harm to pedestrians and drivers we are
responsible for, if those same principles of medical ethics are adopted and
adapted?). Philosophers from Immanuel Kant and Jeremy Bentham in the 18th
century, to Tom Beauchamp and James Childress in the 20th century, have
proposed different approaches to the question of how to do so. Herein, we
discuss three popular approaches, taking a leaf from the current state of
computing ethics [7].

###  III-A Duty Ethics

The ethical theory of deontology – or ‘duty ethics’ – basically posits that a
moral agent999Simply put, a ‘moral agent’ is usually a person who has agency
to decide how to act. has a “sense of duty” or requirement to do the right
thing, which guides their actions. Immanuel Kant’s ‘Categorical Imperative’
offers a beautiful application of this, as summarised succinctly by Rachels:
“When you are thinking about doing something, ask what rule you would be
following if you actually did it… Then ask whether you would be willing for
your [rule]… to become a universal law” [10]. In our example for Violet, she
ought to think about what would happen if all programmers did the way she did,
with no exception: would she be able to live with the consequences on a
universal level? We could quickly see that there are exceptions to this: what
happens if, say, by following her hypothetical universal law, one programmer’s
actions end up disabling life support machines in hospitals?

Following this maxim, hypothetically, if all 2,215,398 packages in the npmjs
ecosystem decided to inject protestware code into their systems, it would
affect all libraries in the ecosystem – with differing levels of severity,
impact, and time needed to revert changes, based on the nature of their
payloads – as well as all the potential applications that adopt the libraries
into the ecosystem. Since JavaScript is the top-ranked language on GitHub,
this is a significant portion of GitHub projects as well. Although her intent
was to protest against persons or groups, this would disqualify the code from
being safely distributed.

Beyond moral harm, protestware will also disqualify the FOSS license, which
has implications in the existing IT infrastructure. For instance, a market
report in 2019101010https://www.fortunebusinessinsights.com/open-source-
services-market-106469 shows that FOSS IT infrastructure is used by 53% of
organisations, 43% integrations, and 42% in digital transformation. While we
recognise the possibility of “ethical” licenses such as the DoNoHarm license
and others111111See e.g., https://ethicalsource.dev/licenses/ and
https://github.com/raisely/NoHarm for examples., we would like to underscore
that duty ethics a la Kant is a moral framework that reasons in terms of how
“a rational being [who] decides to treat people in a certain way… decrees that
this is the way people [i.e., as a whole] are to be treated” [10] (emphases
ours).

Duty Ethics: An example of applying the Kantian Categorical Imperative to the
dilemma would be, e.g., What if all programmers regard malicious code
injection as ethically imperative? One can argue that the library will
ultimately violate the tenets of FOSS, leading to a ban on the library. Hence,
by implication, malicious code injection is not ethical. However, in the same
vein, one could argue that, under the right circumstances, if all programmers
added a benign notice that affirms solidarity with a particular social cause,
there might be a momentum for large-scale social change.

###  III-B Consequentialist ethics

Next, another ethical theory which appeals to many computing professionals,
due to its ‘mathematical’ nature, is utilitarianism \- under the broad banner
of consequentialist ethics. Simply put, it is the consequences that are to be
the yardstick by which to measure one’s initial actions; and it is one’s
responsibility to maximise the overall happiness (or ‘utiles’ if you wish,
mathematically speaking) across all stakeholders, and to minimise any
unhappiness [10]. First proposed by philosophers such as Jeremy Bentham, it is
thus easy to understand the attractiveness of this theory, as it boils down to
an optimisation problem of ‘utiles’. However, translating it into practice is
much harder than it looks on the surface: for starters, how could Violet
measure the overall net gain of her activism? When the ‘utiles’ are divided
across the entire population, does an individual merely get an infinitesmal
$+0.0001$? Also, who gets to be the arbiter of the quantity of the individual
utiles? Most crucially, how would she quantify the overall net loss of
unintended consequences? (Again with our life support machine example from
before: is the unintended death of a person worth $-10,000$? $-100,000$? Some
might decide that is is simply unquantifiable121212 The value of a human life
is a nuanced topic, with different philosophical considerations and
perspectives. Further explication is provided in ethics textbooks, such as
[10].!)

In terms of consequences, the risk of losing any of the users of the library,
potential community of contributors, and also their standing in the FOSS
community, are all net losses that need to be quantified.

Unfortunately, there is no clear answer: and as is the case of many ethical
evaluations, what might be an acceptable solution (or tolerable trade-off) in
one case might not be for another. For starters, benign protestware might only
require, say, an hour for maintainers to revert the changes to the last stable
version (and nothing more); whereas malignant protestware would require
substantially more time to undo the damage caused (i.e., a large difference in
negative utiles levied on different members of the community).

Consequentialist Ethics: An example of a utilitarian’s reasoning would take
the form of, e.g., Potentially risking the ban of the library might be a
bigger consequence (higher nett negative ‘utiles’) than trying to target a
subset of users to send a message (smaller nett positive ‘utiles’), leading to
an overall negative in the balance of probabilities. To put this reasoning in
plain language: although the damage might have short term benefits, the long
term effects and consequences are much larger. A counterargument can also be
made if the potential advantages – again, e.g., lasting social change –
outweighs, e.g., a cosmetic change to a UI with no lasting repercussions.

###  III-C Principlism

A more pragmatic approach will be to follow a set of fixed principles, in the
namesake philosophical framework of principlism. Here, we draw inspiration
from Beauchamp and Childress’ landmark Principles of Biomedical Ethics, which
posits four key principles: respect for autonomy; nonmaleficence (doing no
harm); beneficence (doing good); and justice [12]. All these principles have
been in use in biomedical ethics, and have seen promise in evaluating issues
in technological ethics, such as in deployment in AI-based solutions in
education [9].

Principle 1 — Respect for autonomy: This principle involves respecting the
freedom and autonomy between users, maintainer, and the broader FOSS
community. This lies at the heart of FOSS, per e.g., the Free Software
Foundation [13].

Respect for autonomy: In considering this principle, we have identified at
least four parties involved: the users of a library; the maintainer; the
contributor; and finally the ecosystem as a community of FOSS developers.
Since FOSS is driven by volunteer contributions, would curtailing any party’s
autonomy – from denying them use of the software, to, say, causing them to
work on weekends in order to revert changes to repositories or fix production
code (again, depending on severity and malignancy of protestware) – impact
their freedom, or worse, change any of the parties’ motivations? Overall
considerations will involve respecting the freedom of choice for all parties
involved.

Principle 2 — Nonmaleficence: This principle requires that harm should not be
caused to stakeholders. This includes indirect harm caused to others in the
FOSS community based on their “assumed belief, group membership, or behavior”
[9].

Nonmaleficence: This, we reason, would only apply to the benign form of
protestware. To recap, these forms will not cause undue impact, when compared
to their malignant counterparts which may lead to security vulnerabilities.
Critical questions when evaluating this principle includes, say, How does a
protester manage to send a message, while not causing harm to any of the
stakeholders. There are examples of README placements of
protestware131313https://github.com/vshymanskyy/StandWithUkraine: while
delicate, this is a strategy to use documentation and communication channels,
as opposed to modification of the actual code.

Principle 3 — Beneficence: This principle stipulates that consequence of an
action should result in good or benefit. Note that this does not just consider
the provision of benefits, but also, “balancing benefits against risks and
costs” [12].

Beneficence: As we have seen in our treatise on utilitarianism, the benefits
of protestware could be difficult to quantify at this stage. Nonetheless, an
argument can be made for the benefits of fund-raising efforts such as sponsors
or ad campaigns to create awareness on the political situation. This could be
in the form of incentives to users, and to contributors of the source code.
For historical context, however, a common incentive in sabotaging-one’s-own-
code was to help sponsor struggling maintainers who wanted to protest against
their software being used by large
corporations.141414https://www.independent.co.uk/tech/developer-sabotages-
code-protest-github-colors-faker-b1990161.html

Principle 4 — Justice: The effects of actions must be just and fair in terms
of the distribution of “benefits, risks, and costs” [12].

Justice: Finally, the argument for justice requires not just fairness of
outcomes, but also its distribution, which includes the risks and costs [12].
In a historical context, it is prudent to consider the protest against usage
of FOSS by the industry (which precedes protestware) which some developers
consider to be unfair, raised in Beneficence above. The original raison d’être
involves getting justice against the actual corporations that use the library.
However, at the heart of this principle, other users and stakeholders may be
disproportionately affected by this maneuver which leads it into question.

Think of these as valuable heuristics for which we could evaluate the fitness
of an action we are taking. As seen earlier, particularly in the quote in our
epigraph, philosophers recognise the difficulty of doing the right thing or
knowing what in fact is the right thing [10] which is the difficulty faced by
a moral agent when confronted with a difficult choice. Despite our best
intentions, we might run into trouble fairly quickly. For example, what do we
do when we do not satisfy all the listed heuristics; Violet might (indirectly)
cause harm and deny autonomy to innocent users who are affected by her code
destruction, while still advocating for perceived justice and beneficence,
based on the cause of her activism? The next section will provide us with some
guidance as to how to proceed.

##  IV  Guidelines for Promoting Ethical Responsibility

Assessing the ethical implications of an open source maintainer’s decision to
convert their software into protestware is a multifaceted and intricate
matter. For starters, the ethical frameworks may not agree with each other: as
we have seen, the Kantian Categorical Imperative (duty ethics) might be a
straightforward “don’t do it”.151515It is important to note that the focus of
the paper is separate from the assumptions and trust of FOSS components.

Drawing upon principlism, however, the nuance is visible. From the standpoint
of autonomy, maintainers possess the right to make choices regarding their own
creations. However, this decision may conflict with end users’ autonomy, as it
could restrict their ability to utilize the software without unforeseen — or
disastrous — consequences. The principles of beneficence and non-maleficence
are also crucial to consider: although protestware might advance a greater
good by raising awareness or advocating change, it could simultaneously
inflict harm upon users who depend on the software for essential functions
(again, with our life support machine example raised several times before).
The justice principle underlines the importance of examining the fairness and
equitability of deploying protestware as a protest method. Hence, it is vital
to evaluate whether such actions disproportionately impact specific groups
(including, e.g., time and effort to rectify deleterious code behavior) or
inadvertently create disparities in software resource access. Bearing these
ethical principles in mind, determining the suitability of transforming FOSS
into protestware necessitates a thorough analysis of the potential benefits,
drawbacks, and broader societal ramifications of such a decision.

In this section, we present various initiatives which can be implemented to
promote a more balanced perspective on protestware — with an emphasis on its
potential risks — and encouraging maintainers to consider alternative methods
for expressing their concerns. We also suggest directions for future work,
including examining the role of FOSS governance, policy, and the ‘social
license to operate’, before finally identifying ways to protect users from
protestware threats.

#### Responsibility in the FOSS Community

To minimize the moral dilemmas (and concrete implications) associated with
protestware, maintainers should be encouraged to prioritize the needs of their
users and contribute to the greater good of the FOSS community (as a start),
with a view towards the common good in the broader community of adopters and
users. Cultivating a sense of community and fostering strong relationships
with stakeholders — from end users to fellow developers — can help maintainers
understand the potential consequences of their actions and work together to
develop ethical guidelines. Establishing communication channels and fora for
discussion allows maintainers to express their concerns without resorting to
protestware in the first instance, ensuring the well-being of both the
community and its users. Future work should investigate how the community can
cultivate a culture of care161616Other frameworks of ethics, including care
ethics, are also considered in current research into technology. and moral
responsibility and explore existing channels that allow maintainers to voice
their protests in a non-jeopardizing way.

#### Safeguards against Protestware

Future work could also explore the use of machine learning techniques,
particularly natural language processing and code analysis algorithms, to
detect early indicators of potential protestware in software repositories.
Such techniques, in the same vein as, e.g., automated auditing for privacy and
security issues, could better equip end users or developers to protect
themselves from potential threats, ultimately enhancing the overall security
and trustworthiness of the open-source ecosystem.

#### Enabling Healthy Channels for Protest

It is important for maintainers to feel that their concerns are being
addressed through appropriate channels. Good governance and a fair system of
representation can alleviate the need for protestware by offering maintainers
alternative avenues to voice their opinions and effect change within the FOSS
community. Future research should explore how existing channels for
maintainers to voice their protests or grievances can be improved or expanded.
Beyond the avenues of open dialogue and representation, licensing plays a
pivotal role in shaping the use and dissemination of open-source software. The
choice of license can serve as a proactive mechanism for maintainers and
contributors who wish to place constraints on the use of their software. For
example, choosing the Affero General Public License (AGPL) may dissuade
certain corporate entities from using the software due to its strong copyleft
provisions. Alternatively, maintainers can adopt licenses that impose direct
usage restrictions to specific entities or purposes, although this would
deviate from the standard open source definitions. Such licensing strategies
can provide maintainers with a means to set boundaries and expectations,
reducing the perceived need for more confrontational approaches like
protestware.

#### Education of Ethical Responsibility

While this article is a good first step to foster awareness, ethics
educational programs, focusing on ethical responsibility and social impact,
can help maintainers better understand the potential consequences of using
protestware and foster a more nuanced perspective on this issue. By providing
guidance on ethical decision making and highlighting alternative methods for
expressing concerns, ethics education can play a vital role in promoting a
more balanced and responsible approach to protestware within the FOSS
community. Future work should examine why some developers might feel far
removed from ethical considerations and how educational programs can
effectively address this issue.

##  V  Implications with Future Directions

Taking into account the positives and negatives with the emergence of
protestware, we depict the diverse ethical challenges for various stakeholders
, each with their own perspectives and priorities. In the following
paragraphs, we discuss the implications for different stakeholders,
emphasizing the importance of awareness and providing examples of ethical
frameworks that could be applied in these situations.

Maintainers of the code, when confronted with protestware, play a pivotal role
in shaping the FOSS landscape. It is crucial that they clearly communicate the
intended use and restrictions of their software in the documentation and/or
terms of service while adhering to applicable laws and regulations. As an
example, duty ethics highlights the importance of maintainers’ moral
obligations, such as transparency, honesty, and legal compliance.

Contributors who contribute but are not maintainers of the code, as creators
of public goods, must exercise responsibility, consideration, and ethics in
their actions, particularly when engaging with FOSS projects. It is essential
for contributors to be aware that any project they contribute to could
potentially transform into protestware, and they may have limited control over
the project’s direction despite their contributions. Consequentialist ethics,
for instance, emphasize the need to assess the potential consequences of one’s
actions, urging contributors to be mindful of the projects they engage with,
maximizing positive outcomes, and minimizing potential harm. Awareness of
protestware’s implications and the potential risks of contributing to projects
that may adopt such a stance is key to making informed decisions.

Newcomers to the FOSS community should familiarize themselves with its
principles, values, and ethical implications of protestware. FOSS relies on
community-driven efforts, making it essential for newcomers to be respectful,
collaborative, and helpful. Awareness of the presence of protestware and
potential consequences is critical. As an example, the principle of autonomy
in biomedical ethics underscores the importance of respecting the choices and
values of other members of the community.

End users and industry must be vigilant about the potential risks and benefits
associated with using FOSS tools, acknowledging that any project could
potentially transform into protestware. A key ethical implication for end
users and industry is understanding that an FOSS project’s maintainer might
have different ethical priorities, which in extreme cases could lead to the
creation of protestware. The risk is especially pronounced if end users or
industry already rely on the software, and then it turns into protestware.
Industry, in particular, must be cautious when using FOSS in a professional
setting, ensuring compliance with company policies and regulations. By
assessing risks, addressing potential security vulnerabilities, and
contributing back to projects when possible, the industry can apply ethical
principles like beneficence and non-maleficence from biomedical ethics, as an
example, to promote positive outcomes and minimize harm to stakeholders.
Awareness of the potential impact of protestware and the varying ethical
priorities of project maintainers is crucial for responsible decision-making
within the industry.

Educators have a responsibility to discuss the implications and risks of FOSS,
including protestware and its legal and ethical consequences. Duty ethics, as
an example, encourages educators to impart knowledge of moral obligations and
duties as software creators and users. Guided by consequentialist ethics and
biomedical principles, students should be encouraged to consider the long-term
impacts and ethical implications of their work, particularly with regard to
protestware. The promotion of awareness among students is a key educational
goal.

Researchers play a vital role in identifying and mitigating protestware risks
by developing methods to analyze code for vulnerabilities or detect patterns
in malicious software behavior. By investigating the pros and cons of
protestware as a political protest tool, researchers can apply ethical
frameworks such as consequentialist ethics and biomedical principles to
balance potential benefits and harms while considering justice and fairness
within the FOSS community.

## References

  * [1] R. G. Kula and C. Treude, “In war and peace: The impact of world politics on software ecosystems,” in _Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering_ , 2022, pp. 1600–1604.
  * [2] J.-P. Sartre, _Existentialism and humanism / translation and introduction by Philip Mairet_. London: Methuen, 1948.
  * [3] “Cve-2022-23812,” https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23812, May 2022, (Accessed on 05/11/2022).
  * [4] “Discussion on node-ipc,” https://github.com/RIAEvangelist/node-ipc/discussions/505, May 2022, (Accessed on 05/11/2022).
  * [5] “peacenotwar message,” https://github.com/medikoo/es5-ext/commit/28de285ed433b45113f01e4ce7c74e9a356b2af2, May 2022, (Accessed on 05/11/2022).
  * [6] N. Zahan, T. Zimmermann, P. Godefroid, B. Murphy, C. Maddila, and L. Williams, “What are weak links in the npm supply chain?” in _Proceedings of the 44th International Conference on Software Engineering: Software Engineering in Practice_ , 2022, pp. 331–340.
  * [7] J. Zoshak and K. Dew, “Beyond kant and bentham: How ethical theories are being used in artificial moral agents,” in _Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems_ , ser. CHI ’21. New York, NY, USA: Association for Computing Machinery, 2021. [Online]. Available: https://doi.org/10.1145/3411764.3445102
  * [8] V. C. Müller, _Ethics of Artificial Intelligence and Robotics_ , fall 2020 ed. Metaphysics Research Lab, Stanford University, 2020. [Online]. Available: https://plato.stanford.edu/archives/fall2020/entries/ethics-ai/
  * [9] S. Coghlan, T. Miller, and J. Paterson, “Good proctor or “big brother”? ethics of online exam supervision technologies,” _Philos. Technol._ , vol. 34, no. 4, pp. 1581–1606, Aug. 2021. [Online]. Available: http://dx.doi.org/10.1007/s13347-021-00476-1
  * [10] S. Rachels and J. Rachels, _The Elements of Moral Philosophy_. McGraw-Hill Education, 2015.
  * [11] J. Flynn, “Theory and Bioethics,” in _The Stanford Encyclopedia of Philosophy_ , Winter 2022 ed., E. N. Zalta and U. Nodelman, Eds. Metaphysics Research Lab, Stanford University, 2022.
  * [12] T. L. Beauchamp and J. F. Childress, _Principles of Biomedical Ethics_. Oxford University Press, 1994.
  * [13] Free Software Foundation, Inc., “What is free software?” https://www.gnu.org/philosophy/free-sw.en.html, 2022.